From 953dbf21fdbf418d12540af4d7b08f0dba1e3e1d Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Fri, 23 Jan 2015 13:31:39 -0700 Subject: [PATCH 1/5] bump(github.com/GoogleCloudPlatform/kubernetes):e0acd75629ec29bde764bcde29367146ae8b389b --- Godeps/Godeps.json | 263 +- .../compute/serviceaccount/serviceaccount.go | 172 - .../compute/v1/v1/compute-api.json | 9526 +++++++++ .../compute/v1/v1/compute-gen.go | 16952 ++++++++++++++++ .../v1beta1/v1beta1/container-api.json | 579 + .../v1beta1/v1beta1/container-gen.go | 1007 + .../kubernetes/pkg/api/conversion.go | 12 + .../kubernetes/pkg/api/errors/errors.go | 2 +- .../kubernetes/pkg/api/helpers.go | 24 - .../kubernetes/pkg/api/helpers_test.go | 2 - .../kubernetes/pkg/api/latest/latest_test.go | 4 + .../kubernetes/pkg/api/meta.go | 2 +- .../kubernetes/pkg/api/meta/interfaces.go | 12 +- .../kubernetes/pkg/api/meta/meta.go | 14 +- .../kubernetes/pkg/api/meta/meta_test.go | 28 +- .../pkg/api/meta/restmapper_test.go | 2 +- .../kubernetes/pkg/api/register.go | 6 +- .../kubernetes/pkg/api/resource/quantity.go | 9 +- .../pkg/api/resource/quantity_test.go | 8 + .../kubernetes/pkg/api/serialization_test.go | 11 +- .../kubernetes/pkg/api/types.go | 63 +- .../kubernetes/pkg/api/unversioned.go | 6 + .../kubernetes/pkg/api/v1beta1/conversion.go | 95 +- .../pkg/api/v1beta1/conversion_test.go | 46 + .../kubernetes/pkg/api/v1beta1/register.go | 4 +- .../kubernetes/pkg/api/v1beta1/types.go | 33 +- .../kubernetes/pkg/api/v1beta2/conversion.go | 90 +- .../pkg/api/v1beta2/conversion_test.go | 46 + .../kubernetes/pkg/api/v1beta2/register.go | 4 +- .../kubernetes/pkg/api/v1beta2/types.go | 33 +- .../kubernetes/pkg/api/v1beta3/register.go | 4 +- .../kubernetes/pkg/api/v1beta3/types.go | 66 +- .../pkg/api/validation/schema_test.go | 4 + .../pkg/api/validation/validation.go | 59 +- .../pkg/api/validation/validation_test.go | 90 +- .../kubernetes/pkg/apiserver/apiserver.go | 45 +- .../kubernetes/pkg/apiserver/index.go | 21 +- .../kubernetes/pkg/apiserver/mux_helper.go | 37 + .../kubernetes/pkg/apiserver/proxy.go | 15 +- .../kubernetes/pkg/apiserver/proxy_test.go | 124 +- .../kubernetes/pkg/client/cache/listers.go | 32 +- .../kubernetes/pkg/client/cache/listwatch.go | 2 +- .../pkg/client/clientcmd/api/types.go | 2 + .../pkg/client/clientcmd/api/v1/types.go | 2 + .../pkg/client/clientcmd/client_config.go | 52 +- .../client/clientcmd/client_config_test.go | 18 + .../client/clientcmd/merged_client_builder.go | 10 + .../pkg/client/clientcmd/overrides.go | 76 +- .../pkg/client/clientcmd/validation.go | 2 +- .../kubernetes/pkg/client/events.go | 2 +- .../kubernetes/pkg/client/events_test.go | 3 - .../kubernetes/pkg/client/helper_test.go | 146 +- .../kubernetes/pkg/client/kubelet.go | 28 +- .../kubernetes/pkg/client/kubelet_test.go | 15 +- .../kubernetes/pkg/client/record/event.go | 101 +- .../pkg/client/record/event_test.go | 98 +- .../kubernetes/pkg/client/restclient_test.go | 2 +- .../kubernetes/pkg/cloudprovider/gce/gce.go | 8 +- .../pkg/controller/replication_controller.go | 6 + .../kubernetes/pkg/conversion/converter.go | 37 +- .../pkg/conversion/converter_test.go | 40 + .../kubernetes/pkg/conversion/scheme_test.go | 2 +- .../pkg/credentialprovider/config.go | 1 - .../kubernetes/pkg/health/exec.go | 7 +- .../kubernetes/pkg/health/exec_test.go | 3 +- .../kubernetes/pkg/health/health.go | 7 +- .../kubernetes/pkg/health/http.go | 3 +- .../kubernetes/pkg/health/tcp.go | 3 +- .../pkg/kubecfg/resource_printer.go | 5 +- .../pkg/kubecfg/resource_printer_test.go | 4 +- .../kubernetes/pkg/kubectl/cmd/cmd.go | 78 +- .../kubernetes/pkg/kubectl/cmd/cmd_test.go | 29 +- .../pkg/kubectl/cmd/config/config.go | 2 +- .../kubernetes/pkg/kubectl/cmd/create.go | 5 +- .../kubernetes/pkg/kubectl/cmd/create_test.go | 6 +- .../kubernetes/pkg/kubectl/cmd/delete.go | 11 +- .../kubernetes/pkg/kubectl/cmd/delete_test.go | 44 +- .../kubernetes/pkg/kubectl/cmd/describe.go | 5 +- .../pkg/kubectl/cmd/describe_test.go | 5 +- .../pkg/kubectl/cmd/factory_test.go | 41 + .../kubernetes/pkg/kubectl/cmd/get.go | 15 +- .../kubernetes/pkg/kubectl/cmd/get_test.go | 26 +- .../kubernetes/pkg/kubectl/cmd/helpers.go | 38 + .../pkg/kubectl/cmd/helpers_test.go | 108 + .../kubernetes/pkg/kubectl/cmd/log.go | 3 +- .../kubernetes/pkg/kubectl/cmd/printing.go | 37 +- .../pkg/kubectl/cmd/printing_test.go | 67 + .../kubernetes/pkg/kubectl/cmd/resize.go | 72 + .../kubernetes/pkg/kubectl/cmd/resource.go | 40 +- .../pkg/kubectl/cmd/rollingupdate.go | 20 +- .../kubernetes/pkg/kubectl/cmd/run.go | 25 +- .../kubernetes/pkg/kubectl/cmd/stop.go | 56 + .../kubernetes/pkg/kubectl/cmd/update.go | 81 +- .../kubernetes/pkg/kubectl/describe.go | 3 +- .../kubernetes/pkg/kubectl/generate.go | 4 +- .../kubernetes/pkg/kubectl/generate_test.go | 114 + .../kubernetes/pkg/kubectl/resize.go | 93 + .../kubernetes/pkg/kubectl/resize_test.go | 182 + .../pkg/kubectl/resource_printer.go | 34 +- .../pkg/kubectl/resource_printer_test.go | 76 + .../pkg/kubectl/rolling_updater_test.go | 6 +- .../kubernetes/pkg/kubectl/run_test.go | 104 + .../kubernetes/pkg/kubectl/stop.go | 110 + .../kubernetes/pkg/kubectl/stop_test.go | 168 + .../kubernetes/pkg/kubectl/version.go | 2 +- .../kubernetes/pkg/kubelet/cadvisor.go | 5 +- .../pkg/kubelet/config/apiserver_test.go | 59 +- .../kubernetes/pkg/kubelet/config/config.go | 2 +- .../pkg/kubelet/config/config_test.go | 3 +- .../kubernetes/pkg/kubelet/config/etcd.go | 3 +- .../pkg/kubelet/config/etcd_test.go | 52 + .../kubernetes/pkg/kubelet/config/file.go | 31 +- .../pkg/kubelet/config/file_test.go | 127 +- .../kubernetes/pkg/kubelet/config/http.go | 114 +- .../pkg/kubelet/config/http_test.go | 71 +- .../pkg/kubelet/dockertools/docker.go | 45 +- .../pkg/kubelet/dockertools/docker_test.go | 9 +- .../kubernetes/pkg/kubelet/handlers.go | 15 +- .../kubernetes/pkg/kubelet/kubelet.go | 441 +- .../kubernetes/pkg/kubelet/kubelet_test.go | 555 +- .../kubernetes/pkg/kubelet/server.go | 40 +- .../kubernetes/pkg/kubelet/server_test.go | 51 +- .../kubernetes/pkg/kubelet/util.go | 3 +- .../pkg/{ => kubelet}/volume/doc.go | 0 .../pkg/kubelet/volume/empty_dir/empty_dir.go | 125 + .../volume/empty_dir/empty_dir_test.go | 152 + .../pkg/kubelet/volume/gce_pd/gce_pd.go | 237 + .../pkg/kubelet/volume/gce_pd/gce_pd_test.go | 173 + .../volume/gce_pd}/gce_util.go | 29 +- .../volume/gce_pd}/gce_util_test.go | 2 +- .../pkg/kubelet/volume/gce_pd/mount_util.go | 53 + .../volume/gce_pd/mount_util_linux.go} | 2 +- .../volume/gce_pd/mount_util_unsupported.go} | 4 +- .../pkg/kubelet/volume/git_repo/git_repo.go | 214 + .../kubelet/volume/git_repo/git_repo_test.go | 186 + .../pkg/kubelet/volume/host_path/host_path.go | 81 + .../volume/host_path/host_path_test.go | 86 + .../kubernetes/pkg/kubelet/volume/plugins.go | 174 + .../kubernetes/pkg/kubelet/volume/testing.go | 92 + .../kubernetes/pkg/kubelet/volume/volume.go | 59 + .../kubernetes/pkg/kubelet/volumes.go | 154 + .../kubernetes/pkg/master/master.go | 86 +- .../kubernetes/pkg/master/pod_cache.go | 4 +- .../kubernetes/pkg/master/pod_cache_test.go | 63 +- .../kubernetes/pkg/proxy/config/config.go | 8 +- .../pkg/registry/controller/rest.go | 2 +- .../kubernetes/pkg/registry/etcd/etcd_test.go | 12 +- .../kubernetes/pkg/registry/event/rest.go | 4 +- .../pkg/registry/event/rest_test.go | 24 +- .../pkg/registry/minion/healthy_registry.go | 12 +- .../pkg/registry/pod/bound_pod_factory.go | 37 +- .../registry/pod/bound_pod_factory_test.go | 264 +- .../kubernetes/pkg/registry/pod/rest.go | 2 +- .../pkg/registry/service/rest_test.go | 10 +- .../kubernetes/pkg/runtime/scheme.go | 3 + .../kubernetes/pkg/scheduler/listers.go | 39 + .../kubernetes/pkg/scheduler/predicates.go | 133 +- .../pkg/scheduler/predicates_test.go | 188 +- .../kubernetes/pkg/scheduler/priorities.go | 44 + .../pkg/scheduler/priorities_test.go | 100 + .../kubernetes/pkg/scheduler/spreading.go | 118 +- .../pkg/scheduler/spreading_test.go | 222 +- .../pkg/service/endpoints_controller.go | 10 +- .../kubernetes/pkg/tools/etcd_tools_watch.go | 31 +- .../pkg/tools/etcd_tools_watch_test.go | 53 +- .../kubernetes/pkg/types/doc.go | 18 + .../kubernetes/pkg/types/uid.go | 22 + .../kubernetes/pkg/util/errors/errors.go | 2 +- .../mounter_unsupported.go => util/flags.go} | 25 +- .../kubernetes/pkg/util/logs.go | 3 +- .../kubernetes/pkg/util/net_test.go | 3 +- .../util/{plog_import.go => pflag_import.go} | 34 +- .../kubernetes/pkg/util/set.go | 8 +- .../kubernetes/pkg/util/set_test.go | 23 + .../kubernetes/pkg/util/uuid.go | 9 +- .../kubernetes/pkg/version/base.go | 4 +- .../kubernetes/pkg/version/verflag/verflag.go | 7 +- .../kubernetes/pkg/volume/mounter_linux.go | 89 - .../kubernetes/pkg/volume/volume.go | 438 - .../kubernetes/pkg/volume/volume_test.go | 295 - .../kubernetes/pkg/watch/mux.go | 60 +- .../kubernetes/pkg/watch/mux_test.go | 55 +- .../algorithmprovider/affinity/affinity.go | 55 + .../algorithmprovider/defaults/defaults.go | 10 +- .../scheduler/algorithmprovider/plugins.go | 1 + .../algorithmprovider/plugins_test.go | 10 +- .../plugin/pkg/scheduler/factory/factory.go | 30 +- .../plugin/pkg/scheduler/factory/plugins.go | 60 +- .../pkg/scheduler/factory/plugins_test.go | 41 + .../plugin/pkg/scheduler/scheduler.go | 6 +- .../src/github.com/coreos/etcd/mod/mod.go | 8 +- .../github.com/davecgh/go-spew/spew/dump.go | 6 + .../davecgh/go-spew/spew/dump_test.go | 8 + .../github.com/davecgh/go-spew/spew/format.go | 6 + .../davecgh/go-spew/spew/format_test.go | 5 + .../docker/docker/pkg/archive/archive.go | 48 +- .../docker/docker/pkg/archive/archive_test.go | 8 +- .../docker/docker/pkg/archive/changes_test.go | 2 +- .../docker/docker/pkg/archive/diff.go | 40 +- .../docker/docker/pkg/archive/utils_test.go | 3 +- .../docker/docker/pkg/units/size.go | 2 +- .../docker/docker/pkg/units/size_test.go | 6 +- .../fsouza/go-dockerclient/.travis.yml | 1 + .../github.com/fsouza/go-dockerclient/AUTHORS | 5 + .../fsouza/go-dockerclient/README.markdown | 2 +- .../fsouza/go-dockerclient/client.go | 18 +- .../fsouza/go-dockerclient/container.go | 1 + .../github.com/fsouza/go-dockerclient/exec.go | 48 + .../fsouza/go-dockerclient/exec_test.go | 131 + .../github.com/fsouza/go-dockerclient/tar.go | 6 +- .../go-dockerclient/testing/bin/fmtpolice | 2 +- .../fsouza/go-dockerclient/testing/server.go | 53 +- .../go-dockerclient/testing/server_test.go | 80 + .../github.com/fsouza/go-dockerclient/tls.go | 100 + .../github.com/golang/protobuf/proto/Makefile | 43 + .../golang/protobuf/proto/all_test.go | 2059 ++ .../github.com/golang/protobuf/proto/clone.go | 197 + .../golang/protobuf/proto/clone_test.go | 227 + .../golang/protobuf/proto/decode.go | 823 + .../golang/protobuf/proto/encode.go | 1283 ++ .../github.com/golang/protobuf/proto/equal.go | 256 + .../golang/protobuf/proto/equal_test.go | 191 + .../golang/protobuf/proto/extensions.go | 353 + .../golang/protobuf/proto/extensions_test.go | 137 + .../github.com/golang/protobuf/proto/lib.go | 751 + .../golang/protobuf/proto/message_set.go | 287 + .../golang/protobuf/proto/message_set_test.go | 66 + .../golang/protobuf/proto/pointer_reflect.go | 479 + .../golang/protobuf/proto/pointer_unsafe.go | 266 + .../golang/protobuf/proto/properties.go | 724 + .../protobuf/proto/proto3_proto/Makefile | 44 + .../protobuf/proto/proto3_proto/proto3.proto | 58 + .../golang/protobuf/proto/proto3_test.go | 93 + .../golang/protobuf/proto/size2_test.go | 63 + .../golang/protobuf/proto/size_test.go | 135 + .../golang/protobuf/proto/testdata/Makefile | 50 + .../protobuf/proto/testdata/golden_test.go | 86 + .../golang/protobuf/proto/testdata/test.pb.go | 2389 +++ .../golang/protobuf/proto/testdata/test.proto | 434 + .../github.com/golang/protobuf/proto/text.go | 789 + .../golang/protobuf/proto/text_parser.go | 757 + .../golang/protobuf/proto/text_parser_test.go | 509 + .../golang/protobuf/proto/text_test.go | 436 + .../src/github.com/spf13/pflag/bool.go | 9 + .../src/github.com/spf13/pflag/bool_test.go | 163 + .../github.com/spf13/pflag/example_test.go | 4 + .../src/github.com/spf13/pflag/flag.go | 4 +- .../src/github.com/spf13/pflag/flag_test.go | 4 + .../src/golang.org/x/oauth2/.travis.yml | 14 + .../src/golang.org/x/oauth2/AUTHORS | 3 + .../src/golang.org/x/oauth2/CONTRIBUTING.md | 25 + .../src/golang.org/x/oauth2/CONTRIBUTORS | 3 + .../src/golang.org/x/oauth2/LICENSE | 27 + .../src/golang.org/x/oauth2/README.md | 18 + .../golang.org/x/oauth2/client_appengine.go | 39 + .../src/golang.org/x/oauth2/example_test.go | 50 + .../src/golang.org/x/oauth2/github/github.go | 16 + .../golang.org/x/oauth2/google/appengine.go | 37 + .../golang.org/x/oauth2/google/appenginevm.go | 36 + .../x/oauth2/google/example_test.go | 133 + .../src/golang.org/x/oauth2/google/google.go | 103 + .../x/oauth2/google/source_appengine.go | 71 + .../golang.org/x/oauth2/internal/oauth2.go | 37 + .../src/golang.org/x/oauth2/jws/jws.go | 160 + .../golang.org/x/oauth2/jwt/example_test.go | 31 + .../src/golang.org/x/oauth2/jwt/jwt.go | 146 + .../src/golang.org/x/oauth2/jwt/jwt_test.go | 134 + .../src/golang.org/x/oauth2/oauth2.go | 462 + .../src/golang.org/x/oauth2/oauth2_test.go | 260 + .../src/golang.org/x/oauth2/token.go | 99 + .../src/golang.org/x/oauth2/token_test.go | 30 + .../src/golang.org/x/oauth2/transport.go | 138 + .../src/golang.org/x/oauth2/transport_test.go | 53 + .../google.golang.org/appengine/.travis.yml | 14 + .../src/google.golang.org/appengine/LICENSE | 202 + .../src/google.golang.org/appengine/README.md | 65 + .../google.golang.org/appengine/appengine.go | 78 + .../appengine/appengine_test.go | 45 + .../appengine/channel/channel.go | 81 + .../appengine/channel/channel_test.go | 17 + .../appengine/datastore/datastore.go | 405 + .../appengine/datastore/datastore_test.go | 1499 ++ .../appengine/datastore/doc.go | 316 + .../appengine/datastore/key.go | 309 + .../appengine/datastore/key_test.go | 214 + .../appengine/datastore/load.go | 334 + .../appengine/datastore/prop.go | 294 + .../appengine/datastore/prop_test.go | 559 + .../appengine/datastore/query.go | 712 + .../appengine/datastore/query_test.go | 580 + .../appengine/datastore/save.go | 300 + .../appengine/datastore/time_test.go | 65 + .../appengine/datastore/transaction.go | 138 + .../appengine/delay/delay.go | 275 + .../appengine/delay/delay_test.go | 307 + .../appengine/demos/guestbook/app.yaml | 19 + .../appengine/demos/guestbook/favicon.ico | Bin 0 -> 1150 bytes .../appengine/demos/guestbook/guestbook.go | 102 + .../appengine/demos/guestbook/index.yaml | 7 + .../demos/guestbook/templates/guestbook.html | 26 + .../appengine/demos/helloworld/app.yaml | 15 + .../appengine/demos/helloworld/favicon.ico | Bin 0 -> 1150 bytes .../appengine/demos/helloworld/helloworld.go | 45 + .../src/google.golang.org/appengine/errors.go | 46 + .../google.golang.org/appengine/file/file.go | 26 + .../google.golang.org/appengine/identity.go | 141 + .../appengine/image/image.go | 65 + .../appengine/internal/aetesting/fake.go | 88 + .../appengine/internal/api.go | 589 + .../appengine/internal/api_race_test.go | 5 + .../appengine/internal/api_test.go | 412 + .../appengine/internal/app_id.go | 28 + .../appengine/internal/app_id_test.go | 34 + .../app_identity/app_identity_service.pb.go | 295 + .../app_identity/app_identity_service.proto | 64 + .../appengine/internal/base/api_base.pb.go | 134 + .../appengine/internal/base/api_base.proto | 33 + .../internal/channel/channel_service.pb.go | 153 + .../internal/channel/channel_service.proto | 30 + .../internal/datastore/datastore_v3.pb.go | 2787 +++ .../internal/datastore/datastore_v3.proto | 541 + .../appengine/internal/identity.go | 12 + .../appengine/internal/identity_vm.go | 85 + .../internal/image/images_service.pb.go | 848 + .../internal/image/images_service.proto | 162 + .../appengine/internal/internal.go | 165 + .../appengine/internal/internal_test.go | 54 + .../appengine/internal/log/log_service.pb.go | 898 + .../appengine/internal/log/log_service.proto | 150 + .../internal/mail/mail_service.pb.go | 228 + .../internal/mail/mail_service.proto | 45 + .../internal/memcache/memcache_service.pb.go | 942 + .../internal/memcache/memcache_service.proto | 165 + .../appengine/internal/metadata.go | 61 + .../internal/modules/modules_service.pb.go | 374 + .../internal/modules/modules_service.proto | 80 + .../appengine/internal/net.go | 63 + .../appengine/internal/net_test.go | 55 + .../appengine/internal/regen.sh | 36 + .../internal/remote_api/remote_api.pb.go | 230 + .../internal/remote_api/remote_api.proto | 44 + .../appengine/internal/search/search.pb.go | 2072 ++ .../appengine/internal/search/search.proto | 376 + .../taskqueue/taskqueue_service.pb.go | 1890 ++ .../taskqueue/taskqueue_service.proto | 342 + .../appengine/internal/transaction.go | 30 + .../internal/urlfetch/urlfetch_service.pb.go | 355 + .../internal/urlfetch/urlfetch_service.proto | 64 + .../internal/user/user_service.pb.go | 288 + .../internal/user/user_service.proto | 58 + .../internal/xmpp/xmpp_service.pb.go | 428 + .../internal/xmpp/xmpp_service.proto | 83 + .../google.golang.org/appengine/log/log.go | 322 + .../appengine/log/log_test.go | 108 + .../google.golang.org/appengine/mail/mail.go | 123 + .../appengine/mail/mail_test.go | 65 + .../appengine/memcache/memcache.go | 525 + .../appengine/memcache/memcache_test.go | 255 + .../appengine/module/module.go | 112 + .../appengine/module/module_test.go | 124 + .../google.golang.org/appengine/namespace.go | 48 + .../appengine/namespace_test.go | 33 + .../appengine/remote_api/client.go | 173 + .../appengine/remote_api/client_test.go | 20 + .../appengine/remote_api/remote_api.go | 142 + .../appengine/search/field.go | 144 + .../appengine/search/search.go | 853 + .../appengine/search/search_test.go | 650 + .../appengine/taskqueue/taskqueue.go | 493 + .../appengine/taskqueue/taskqueue_test.go | 103 + .../google.golang.org/appengine/timeout.go | 49 + .../appengine/timeout_test.go | 59 + .../appengine/urlfetch/urlfetch.go | 211 + .../google.golang.org/appengine/user/oauth.go | 46 + .../google.golang.org/appengine/user/user.go | 103 + .../appengine/user/user_test.go | 97 + .../google.golang.org/appengine/xmpp/xmpp.go | 251 + .../appengine/xmpp/xmpp_test.go | 173 + .../cloud/compute/metadata/go13.go | 37 + .../cloud/compute/metadata/metadata.go | 267 + .../google.golang.org/cloud/internal/cloud.go | 128 + .../internal/datastore/datastore_v1.pb.go | 1633 ++ .../internal/datastore/datastore_v1.proto | 594 + .../cloud/internal/testutil/context.go | 57 + 384 files changed, 83742 insertions(+), 2489 deletions(-) delete mode 100644 Godeps/_workspace/src/code.google.com/p/goauth2/compute/serviceaccount/serviceaccount.go create mode 100644 Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-api.json create mode 100644 Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-gen.go create mode 100644 Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-api.json create mode 100644 Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-gen.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/mux_helper.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/factory_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/helpers_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/printing_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/resize.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/stop.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/generate_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resize.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resize_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/run_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/stop.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/stop_test.go rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/{ => kubelet}/volume/doc.go (100%) create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/empty_dir/empty_dir.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/empty_dir/empty_dir_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/gce_pd/gce_pd.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/gce_pd/gce_pd_test.go rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/{volume => kubelet/volume/gce_pd}/gce_util.go (78%) rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/{volume => kubelet/volume/gce_pd}/gce_util_test.go (98%) create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/gce_pd/mount_util.go rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/{volume/mount_utils.go => kubelet/volume/gce_pd/mount_util_linux.go} (98%) rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/{volume/mount_utils_windows.go => kubelet/volume/gce_pd/mount_util_unsupported.go} (95%) create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/git_repo/git_repo.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/git_repo/git_repo_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/host_path/host_path.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/host_path/host_path_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/plugins.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/testing.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/volume.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volumes.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/types/doc.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/types/uid.go rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/{volume/mounter_unsupported.go => util/flags.go} (58%) rename Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/{plog_import.go => pflag_import.go} (74%) delete mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/volume/mounter_linux.go delete mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/volume/volume.go delete mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/volume/volume_test.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithmprovider/affinity/affinity.go create mode 100644 Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/factory/plugins_test.go create mode 100644 Godeps/_workspace/src/github.com/fsouza/go-dockerclient/tls.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/Makefile create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/all_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/clone.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/clone_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/decode.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/encode.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/equal.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/equal_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/extensions.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/extensions_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/lib.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/message_set.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/message_set_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/pointer_reflect.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/pointer_unsafe.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/properties.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/proto3_proto/Makefile create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/proto3_proto/proto3.proto create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/proto3_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/size2_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/size_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/testdata/Makefile create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/testdata/golden_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/testdata/test.pb.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/testdata/test.proto create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/text.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/text_parser.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/text_parser_test.go create mode 100644 Godeps/_workspace/src/github.com/golang/protobuf/proto/text_test.go create mode 100644 Godeps/_workspace/src/github.com/spf13/pflag/bool_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/.travis.yml create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/AUTHORS create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/CONTRIBUTING.md create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/CONTRIBUTORS create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/LICENSE create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/README.md create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/client_appengine.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/example_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/github/github.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/google/appengine.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/google/appenginevm.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/google/example_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/google/google.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/google/source_appengine.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/internal/oauth2.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/jws/jws.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/jwt/example_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/jwt/jwt.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/jwt/jwt_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/oauth2.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/oauth2_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/token.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/token_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/transport.go create mode 100644 Godeps/_workspace/src/golang.org/x/oauth2/transport_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/.travis.yml create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/LICENSE create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/README.md create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/appengine.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/appengine_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/channel/channel.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/channel/channel_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/datastore.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/datastore_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/doc.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/key.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/key_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/load.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/prop.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/prop_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/query.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/query_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/save.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/time_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/datastore/transaction.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/delay/delay.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/delay/delay_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/guestbook/app.yaml create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/guestbook/favicon.ico create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/guestbook/guestbook.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/guestbook/index.yaml create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/guestbook/templates/guestbook.html create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/helloworld/app.yaml create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/helloworld/favicon.ico create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/demos/helloworld/helloworld.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/errors.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/file/file.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/identity.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/image/image.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/aetesting/fake.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/api.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/api_race_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/api_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/app_id.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/app_id_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/app_identity/app_identity_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/base/api_base.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/base/api_base.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/channel/channel_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/channel/channel_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/datastore/datastore_v3.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/datastore/datastore_v3.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/identity.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/identity_vm.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/image/images_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/image/images_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/internal.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/internal_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/log/log_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/log/log_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/mail/mail_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/mail/mail_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/memcache/memcache_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/memcache/memcache_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/metadata.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/modules/modules_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/modules/modules_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/net.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/net_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/regen.sh create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/remote_api/remote_api.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/remote_api/remote_api.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/search/search.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/search/search.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/taskqueue/taskqueue_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/taskqueue/taskqueue_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/transaction.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/urlfetch/urlfetch_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/user/user_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/user/user_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/xmpp/xmpp_service.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/internal/xmpp/xmpp_service.proto create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/log/log.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/log/log_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/mail/mail.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/mail/mail_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/memcache/memcache.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/memcache/memcache_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/module/module.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/module/module_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/namespace.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/namespace_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/remote_api/client.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/remote_api/client_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/remote_api/remote_api.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/search/field.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/search/search.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/search/search_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/taskqueue/taskqueue.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/taskqueue/taskqueue_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/timeout.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/timeout_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/urlfetch/urlfetch.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/user/oauth.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/user/user.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/user/user_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/xmpp/xmpp.go create mode 100644 Godeps/_workspace/src/google.golang.org/appengine/xmpp/xmpp_test.go create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/compute/metadata/go13.go create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/compute/metadata/metadata.go create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/cloud.go create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.pb.go create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/datastore/datastore_v1.proto create mode 100644 Godeps/_workspace/src/google.golang.org/cloud/internal/testutil/context.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index f6a126e1d2de..090fbc291a1b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -10,11 +10,6 @@ "Comment": "null-12", "Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9" }, - { - "ImportPath": "code.google.com/p/goauth2/compute/serviceaccount", - "Comment": "weekly-50", - "Rev": "7fc9d958c83464bd7650240569bf93a102266e6a" - }, { "ImportPath": "code.google.com/p/goauth2/oauth", "Comment": "weekly-50", @@ -22,243 +17,243 @@ }, { "ImportPath": "code.google.com/p/google-api-go-client/compute/v1", - "Comment": "release-105", - "Rev": "98c78185197025f935947caac56a7b6d022f89d2" + "Comment": "release-107", + "Rev": "6ddfebb10ece847f1ae09c701834f1b15abbd8b2" }, { "ImportPath": "code.google.com/p/google-api-go-client/container/v1beta1", - "Comment": "release-105", - "Rev": "98c78185197025f935947caac56a7b6d022f89d2" + "Comment": "release-107", + "Rev": "6ddfebb10ece847f1ae09c701834f1b15abbd8b2" }, { "ImportPath": "code.google.com/p/google-api-go-client/googleapi", - "Comment": "release-105", - "Rev": "98c78185197025f935947caac56a7b6d022f89d2" + "Comment": "release-107", + "Rev": "6ddfebb10ece847f1ae09c701834f1b15abbd8b2" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/admission", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/api", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authenticator", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authorizer", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/handlers", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/client", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/clientauth", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/constraint", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/controller", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/conversion", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/credentialprovider", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/health", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/httplog", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubecfg", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/labels", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/master", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/proxy", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/binding", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/endpoint", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/etcd", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/event", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/minion", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/service", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/scheduler", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/service", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/tools", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" + }, + { + "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/types", + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/ui", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/util", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/version", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" - }, - { - "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/volume", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/watch", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/admit", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/auth/authenticator/token/tokenfile", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler", - "Comment": "v0.8.0-276-gdbe1bd9", - "Rev": "dbe1bd9b158ee047f4307ab59ee38652b2cd7c76" + "Comment": "v0.8.0-607-ge0acd75", + "Rev": "e0acd75629ec29bde764bcde29367146ae8b389b" }, { "ImportPath": "github.com/RangelReale/osin", @@ -400,7 +395,7 @@ }, { "ImportPath": "github.com/davecgh/go-spew/spew", - "Rev": "83f84dc933714d51504ceed59f43ead21d096fe7" + "Rev": "1aaf839fb07e099361e445273993ccd9adc21b07" }, { "ImportPath": "github.com/docker/docker/dockerversion", @@ -409,13 +404,13 @@ }, { "ImportPath": "github.com/docker/docker/pkg/archive", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/pkg/fileutils", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/pkg/httputils", @@ -424,23 +419,23 @@ }, { "ImportPath": "github.com/docker/docker/pkg/ioutils", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/pkg/pools", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/pkg/promise", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/pkg/system", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/pkg/tarsum", @@ -459,8 +454,8 @@ }, { "ImportPath": "github.com/docker/docker/pkg/units", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/docker/docker/utils", @@ -469,8 +464,8 @@ }, { "ImportPath": "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar", - "Comment": "v1.4.1-108-g364720b", - "Rev": "364720b5e7e725cdc466171de873eefdb8609a33" + "Comment": "v1.4.1-656-g2115131", + "Rev": "211513156dc1ace48e630b4bf4ea0fcfdc8d9abf" }, { "ImportPath": "github.com/elazarl/go-bindata-assetfs", @@ -483,8 +478,8 @@ }, { "ImportPath": "github.com/fsouza/go-dockerclient", - "Comment": "0.2.1-334-g9c377ff", - "Rev": "9c377ffd9aed48a012adf1c3fd517fe98394120b" + "Comment": "0.2.1-357-gd197177", + "Rev": "d19717788084716e4adff0515be6289aa04bec46" }, { "ImportPath": "github.com/getsentry/raven-go", @@ -498,6 +493,10 @@ "ImportPath": "github.com/golang/glog", "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" }, + { + "ImportPath": "github.com/golang/protobuf/proto", + "Rev": "7f07925444bb51fa4cf9dfe6f7661876f8852275" + }, { "ImportPath": "github.com/google/cadvisor/client", "Comment": "0.6.2", @@ -557,7 +556,7 @@ }, { "ImportPath": "github.com/spf13/pflag", - "Rev": "463bdc838f2b35e9307e91d480878bda5fff7232" + "Rev": "f82776d6cc998e3c026baef7b24409ff49fe5c8d" }, { "ImportPath": "golang.org/x/net/context", @@ -571,6 +570,22 @@ "ImportPath": "golang.org/x/net/websocket", "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" }, + { + "ImportPath": "golang.org/x/oauth2", + "Rev": "2e66694fea36dc820636630792a55cdc6987e05b" + }, + { + "ImportPath": "google.golang.org/appengine", + "Rev": "6aa67407028217c352e215f5af320a429d0bcf5f" + }, + { + "ImportPath": "google.golang.org/cloud/compute/metadata", + "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" + }, + { + "ImportPath": "google.golang.org/cloud/internal", + "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" + }, { "ImportPath": "gopkg.in/yaml.v2", "Rev": "d466437aa4adc35830964cffc5b5f262c63ddcb4" diff --git a/Godeps/_workspace/src/code.google.com/p/goauth2/compute/serviceaccount/serviceaccount.go b/Godeps/_workspace/src/code.google.com/p/goauth2/compute/serviceaccount/serviceaccount.go deleted file mode 100644 index ed3e10cf5f9c..000000000000 --- a/Godeps/_workspace/src/code.google.com/p/goauth2/compute/serviceaccount/serviceaccount.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2013 The goauth2 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 serviceaccount provides support for making OAuth2-authorized -// HTTP requests from Google Compute Engine instances using service accounts. -// -// See: https://developers.google.com/compute/docs/authentication -// -// Example usage: -// -// client, err := serviceaccount.NewClient(&serviceaccount.Options{}) -// if err != nil { -// c.Errorf("failed to create service account client: %q", err) -// return err -// } -// client.Post("https://www.googleapis.com/compute/...", ...) -// client.Post("https://www.googleapis.com/bigquery/...", ...) -// -package serviceaccount - -import ( - "encoding/json" - "net/http" - "net/url" - "path" - "sync" - "time" - - "code.google.com/p/goauth2/oauth" -) - -const ( - metadataServer = "metadata" - serviceAccountPath = "/computeMetadata/v1/instance/service-accounts" -) - -// Options configures a service account Client. -type Options struct { - // Underlying transport of service account Client. - // If nil, http.DefaultTransport is used. - Transport http.RoundTripper - - // Service account name. - // If empty, "default" is used. - Account string -} - -// NewClient returns an *http.Client authorized with the service account -// configured in the Google Compute Engine instance. -func NewClient(opt *Options) (*http.Client, error) { - tr := http.DefaultTransport - account := "default" - if opt != nil { - if opt.Transport != nil { - tr = opt.Transport - } - if opt.Account != "" { - account = opt.Account - } - } - t := &transport{ - Transport: tr, - Account: account, - } - // Get the initial access token. - if _, err := fetchToken(t); err != nil { - return nil, err - } - return &http.Client{ - Transport: t, - }, nil -} - -type tokenData struct { - AccessToken string `json:"access_token"` - ExpiresIn float64 `json:"expires_in"` - TokenType string `json:"token_type"` -} - -// transport is an oauth.Transport with a custom Refresh and RoundTrip implementation. -type transport struct { - Transport http.RoundTripper - Account string - - mu sync.Mutex - *oauth.Token -} - -// Refresh renews the transport's AccessToken. -// t.mu sould be held when this is called. -func (t *transport) refresh() error { - // https://developers.google.com/compute/docs/metadata#transitioning - // v1 requires "Metadata-Flavor: Google" header. - tokenURL := &url.URL{ - Scheme: "http", - Host: metadataServer, - Path: path.Join(serviceAccountPath, t.Account, "token"), - } - req, err := http.NewRequest("GET", tokenURL.String(), nil) - if err != nil { - return err - } - req.Header.Add("Metadata-Flavor", "Google") - resp, err := http.DefaultClient.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - d := json.NewDecoder(resp.Body) - var token tokenData - err = d.Decode(&token) - if err != nil { - return err - } - t.Token = &oauth.Token{ - AccessToken: token.AccessToken, - Expiry: time.Now().Add(time.Duration(token.ExpiresIn) * time.Second), - } - return nil -} - -// Refresh renews the transport's AccessToken. -func (t *transport) Refresh() error { - t.mu.Lock() - defer t.mu.Unlock() - return t.refresh() -} - -// Fetch token from cache or generate a new one if cache miss or expired. -func fetchToken(t *transport) (*oauth.Token, error) { - // Get a new token using Refresh in case of a cache miss of if it has expired. - t.mu.Lock() - defer t.mu.Unlock() - if t.Token == nil || t.Expired() { - if err := t.refresh(); err != nil { - return nil, err - } - } - return t.Token, nil -} - -// cloneRequest returns a clone of the provided *http.Request. -// The clone is a shallow copy of the struct and its Header map. -func cloneRequest(r *http.Request) *http.Request { - // shallow copy of the struct - r2 := new(http.Request) - *r2 = *r - // deep copy of the Header - r2.Header = make(http.Header) - for k, s := range r.Header { - r2.Header[k] = s - } - return r2 -} - -// RoundTrip issues an authorized HTTP request and returns its response. -func (t *transport) RoundTrip(req *http.Request) (*http.Response, error) { - token, err := fetchToken(t) - if err != nil { - return nil, err - } - - // To set the Authorization header, we must make a copy of the Request - // so that we don't modify the Request we were given. - // This is required by the specification of http.RoundTripper. - newReq := cloneRequest(req) - newReq.Header.Set("Authorization", "Bearer "+token.AccessToken) - - // Make the HTTP request. - return t.Transport.RoundTrip(newReq) -} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-api.json b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-api.json new file mode 100644 index 000000000000..726a0ac363d3 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-api.json @@ -0,0 +1,9526 @@ +{ + "kind": "discovery#restDescription", + "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/qp3DHGvWPpREzEdWk7WwxnpgC9w\"", + "discoveryVersion": "v1", + "id": "compute:v1", + "name": "compute", + "version": "v1", + "revision": "20141014", + "title": "Compute Engine API", + "description": "API for the Google Compute Engine service.", + "ownerDomain": "google.com", + "ownerName": "Google", + "icons": { + "x16": "https://www.google.com/images/icons/product/compute_engine-16.png", + "x32": "https://www.google.com/images/icons/product/compute_engine-32.png" + }, + "documentationLink": "https://developers.google.com/compute/docs/reference/latest/", + "protocol": "rest", + "baseUrl": "https://www.googleapis.com/compute/v1/projects/", + "basePath": "/compute/v1/projects/", + "rootUrl": "https://www.googleapis.com/", + "servicePath": "compute/v1/projects/", + "batchPath": "batch", + "parameters": { + "alt": { + "type": "string", + "description": "Data format for the response.", + "default": "json", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query" + }, + "fields": { + "type": "string", + "description": "Selector specifying which fields to include in a partial response.", + "location": "query" + }, + "key": { + "type": "string", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query" + }, + "oauth_token": { + "type": "string", + "description": "OAuth 2.0 token for the current user.", + "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "location": "query" + }, + "quotaUser": { + "type": "string", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", + "location": "query" + }, + "userIp": { + "type": "string", + "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", + "location": "query" + } + }, + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/compute": { + "description": "View and manage your Google Compute Engine resources" + }, + "https://www.googleapis.com/auth/compute.readonly": { + "description": "View your Google Compute Engine resources" + }, + "https://www.googleapis.com/auth/devstorage.full_control": { + "description": "Manage your data and permissions in Google Cloud Storage" + }, + "https://www.googleapis.com/auth/devstorage.read_only": { + "description": "View your data in Google Cloud Storage" + }, + "https://www.googleapis.com/auth/devstorage.read_write": { + "description": "Manage your data in Google Cloud Storage" + } + } + } + }, + "schemas": { + "AccessConfig": { + "id": "AccessConfig", + "type": "object", + "description": "An access configuration attached to an instance's network interface.", + "properties": { + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#accessConfig" + }, + "name": { + "type": "string", + "description": "Name of this access configuration." + }, + "natIP": { + "type": "string", + "description": "An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool." + }, + "type": { + "type": "string", + "description": "Type of configuration. Must be set to \"ONE_TO_ONE_NAT\". This configures port-for-port NAT to the internet.", + "default": "ONE_TO_ONE_NAT", + "enum": [ + "ONE_TO_ONE_NAT" + ], + "enumDescriptions": [ + "" + ] + } + } + }, + "Address": { + "id": "Address", + "type": "object", + "description": "A reserved address resource.", + "properties": { + "address": { + "type": "string", + "description": "The IP address represented by this resource." + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#address" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.addresses.insert" + ] + } + }, + "region": { + "type": "string", + "description": "URL of the region where the regional address resides (output only). This field is not applicable to global addresses." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "status": { + "type": "string", + "description": "The status of the address (output only).", + "enum": [ + "IN_USE", + "RESERVED" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "users": { + "type": "array", + "description": "The resources that are using this address resource.", + "items": { + "type": "string" + } + } + } + }, + "AddressAggregatedList": { + "id": "AddressAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped address lists.", + "additionalProperties": { + "$ref": "AddressesScopedList", + "description": "Name of the scope containing this set of addresses." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#addressAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "AddressList": { + "id": "AddressList", + "type": "object", + "description": "Contains a list of address resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The address resources.", + "items": { + "$ref": "Address" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#addressList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + } + } + }, + "AddressesScopedList": { + "id": "AddressesScopedList", + "type": "object", + "properties": { + "addresses": { + "type": "array", + "description": "List of addresses contained in this scope.", + "items": { + "$ref": "Address" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "AttachedDisk": { + "id": "AttachedDisk", + "type": "object", + "description": "An instance-attached disk resource.", + "properties": { + "autoDelete": { + "type": "boolean", + "description": "Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance)." + }, + "boot": { + "type": "boolean", + "description": "Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem." + }, + "deviceName": { + "type": "string", + "description": "Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system." + }, + "index": { + "type": "integer", + "description": "A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).", + "format": "int32" + }, + "initializeParams": { + "$ref": "AttachedDiskInitializeParams", + "description": "Initialization parameters." + }, + "interface": { + "type": "string", + "enum": [ + "NVME", + "SCSI" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#attachedDisk" + }, + "licenses": { + "type": "array", + "description": "Public visible licenses.", + "items": { + "type": "string" + } + }, + "mode": { + "type": "string", + "description": "The mode in which to attach this disk, either \"READ_WRITE\" or \"READ_ONLY\".", + "enum": [ + "READ_ONLY", + "READ_WRITE" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "source": { + "type": "string", + "description": "Persistent disk only; the URL of the persistent disk resource." + }, + "type": { + "type": "string", + "description": "Type of the disk, either \"SCRATCH\" or \"PERSISTENT\". Note that persistent disks must be created before you can specify them here.", + "enum": [ + "PERSISTENT", + "SCRATCH" + ], + "enumDescriptions": [ + "", + "" + ], + "annotations": { + "required": [ + "compute.instances.insert" + ] + } + } + } + }, + "AttachedDiskInitializeParams": { + "id": "AttachedDiskInitializeParams", + "type": "object", + "description": "Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'.", + "properties": { + "diskName": { + "type": "string", + "description": "Name of the disk (when not provided defaults to the name of the instance)." + }, + "diskSizeGb": { + "type": "string", + "description": "Size of the disk in base-2 GB.", + "format": "int64" + }, + "diskType": { + "type": "string", + "description": "URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created." + }, + "sourceImage": { + "type": "string", + "description": "The source image used to create this disk." + } + } + }, + "Backend": { + "id": "Backend", + "type": "object", + "description": "Message containing information of one individual backend.", + "properties": { + "balancingMode": { + "type": "string", + "description": "The balancing mode of this backend, default is UTILIZATION.", + "enum": [ + "RATE", + "UTILIZATION" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "capacityScaler": { + "type": "number", + "description": "The multiplier (a value between 0 and 1e6) of the max capacity (CPU or RPS, depending on 'balancingMode') the group should serve up to. 0 means the group is totally drained. Default value is 1. Valid range is [0, 1e6].", + "format": "float" + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource, which is provided by the client when the resource is created." + }, + "group": { + "type": "string", + "description": "URL of a zonal Cloud Resource View resource. This resource view defines the list of instances that serve traffic. Member virtual machine instances from each resource view must live in the same zone as the resource view itself. No two backends in a backend service are allowed to use same Resource View resource." + }, + "maxRate": { + "type": "integer", + "description": "The max RPS of the group. Can be used with either balancing mode, but required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance must be set.", + "format": "int32" + }, + "maxRatePerInstance": { + "type": "number", + "description": "The max RPS that a single backed instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set.", + "format": "float" + }, + "maxUtilization": { + "type": "number", + "description": "Used when 'balancingMode' is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0, 1].", + "format": "float" + } + } + }, + "BackendService": { + "id": "BackendService", + "type": "object", + "description": "A BackendService resource. This resource defines a group of backend VMs together with their serving capacity.", + "properties": { + "backends": { + "type": "array", + "description": "The list of backends that serve this BackendService.", + "items": { + "$ref": "Backend" + } + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "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.", + "format": "byte" + }, + "healthChecks": { + "type": "array", + "description": "The list of URLs to the HttpHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified, and a health check is required.", + "items": { + "type": "string" + } + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#backendService" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "port": { + "type": "integer", + "description": "Deprecated in favor of port_name. The TCP port to connect on the backend. The default value is 80.", + "format": "int32" + }, + "portName": { + "type": "string", + "description": "Name of backend port. The same name should appear in the resource views referenced by this service. Required." + }, + "protocol": { + "type": "string", + "enum": [ + "HTTP" + ], + "enumDescriptions": [ + "" + ] + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "timeoutSec": { + "type": "integer", + "description": "How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds.", + "format": "int32" + } + } + }, + "BackendServiceGroupHealth": { + "id": "BackendServiceGroupHealth", + "type": "object", + "properties": { + "healthStatus": { + "type": "array", + "items": { + "$ref": "HealthStatus" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#backendServiceGroupHealth" + } + } + }, + "BackendServiceList": { + "id": "BackendServiceList", + "type": "object", + "description": "Contains a list of BackendService resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The BackendService resources.", + "items": { + "$ref": "BackendService" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#backendServiceList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "DeprecationStatus": { + "id": "DeprecationStatus", + "type": "object", + "description": "Deprecation status for a public resource.", + "properties": { + "deleted": { + "type": "string", + "description": "An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DELETED." + }, + "deprecated": { + "type": "string", + "description": "An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to DEPRECATED." + }, + "obsolete": { + "type": "string", + "description": "An optional RFC3339 timestamp on or after which the deprecation state of this resource will be changed to OBSOLETE." + }, + "replacement": { + "type": "string", + "description": "A URL of the suggested replacement for the deprecated resource. The deprecated resource and its replacement must be resources of the same kind." + }, + "state": { + "type": "string", + "description": "The deprecation state. Can be \"DEPRECATED\", \"OBSOLETE\", or \"DELETED\". Operations which create a new resource using a \"DEPRECATED\" resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. New uses of \"OBSOLETE\" or \"DELETED\" resources will result in an error.", + "enum": [ + "DELETED", + "DEPRECATED", + "OBSOLETE" + ], + "enumDescriptions": [ + "", + "", + "" + ] + } + } + }, + "Disk": { + "id": "Disk", + "type": "object", + "description": "A persistent disk resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#disk" + }, + "licenses": { + "type": "array", + "description": "Public visible licenses.", + "items": { + "type": "string" + } + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.disks.insert" + ] + } + }, + "options": { + "type": "string", + "description": "Internal use only." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "sizeGb": { + "type": "string", + "description": "Size of the persistent disk, specified in GB. This parameter is optional when creating a disk from a disk image or a snapshot, otherwise it is required.", + "format": "int64" + }, + "sourceImage": { + "type": "string", + "description": "The source image used to create this disk." + }, + "sourceImageId": { + "type": "string", + "description": "The 'id' value of the image used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given image." + }, + "sourceSnapshot": { + "type": "string", + "description": "The source snapshot used to create this disk." + }, + "sourceSnapshotId": { + "type": "string", + "description": "The 'id' value of the snapshot used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given disk snapshot." + }, + "status": { + "type": "string", + "description": "The status of disk creation (output only).", + "enum": [ + "CREATING", + "FAILED", + "READY", + "RESTORING" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "type": { + "type": "string", + "description": "URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created." + }, + "zone": { + "type": "string", + "description": "URL of the zone where the disk resides (output only)." + } + } + }, + "DiskAggregatedList": { + "id": "DiskAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped disk lists.", + "additionalProperties": { + "$ref": "DisksScopedList", + "description": "Name of the scope containing this set of disks." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#diskAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "DiskList": { + "id": "DiskList", + "type": "object", + "description": "Contains a list of persistent disk resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The persistent disk resources.", + "items": { + "$ref": "Disk" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#diskList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "DiskType": { + "id": "DiskType", + "type": "object", + "description": "A disk type resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "defaultDiskSizeGb": { + "type": "string", + "description": "Server defined default disk size in gb (output only).", + "format": "int64" + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "The deprecation status associated with this disk type." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#diskType" + }, + "name": { + "type": "string", + "description": "Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "validDiskSize": { + "type": "string", + "description": "An optional textual descroption of the valid disk size, e.g., \"10GB-10TB\"." + }, + "zone": { + "type": "string", + "description": "Url of the zone where the disk type resides (output only)." + } + } + }, + "DiskTypeAggregatedList": { + "id": "DiskTypeAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped disk type lists.", + "additionalProperties": { + "$ref": "DiskTypesScopedList", + "description": "Name of the scope containing this set of disk types." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#diskTypeAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "DiskTypeList": { + "id": "DiskTypeList", + "type": "object", + "description": "Contains a list of disk type resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The disk type resources.", + "items": { + "$ref": "DiskType" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#diskTypeList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "DiskTypesScopedList": { + "id": "DiskTypesScopedList", + "type": "object", + "properties": { + "diskTypes": { + "type": "array", + "description": "List of disk types contained in this scope.", + "items": { + "$ref": "DiskType" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of disk types when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "DisksScopedList": { + "id": "DisksScopedList", + "type": "object", + "properties": { + "disks": { + "type": "array", + "description": "List of disks contained in this scope.", + "items": { + "$ref": "Disk" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of disks when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "Firewall": { + "id": "Firewall", + "type": "object", + "description": "A firewall resource.", + "properties": { + "allowed": { + "type": "array", + "description": "The list of 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": "Required; this is the IP protocol that is allowed for this rule. This can either be one of the following well known protocol strings [\"tcp\", \"udp\", \"icmp\", \"esp\", \"ah\", \"sctp\"], or the IP protocol number." + }, + "ports": { + "type": "array", + "description": "An optional list of ports which are allowed. It is an error to specify this for any protocol that isn't UDP or TCP. Each entry must be either an integer or a range. If not specified, connections through any port are allowed.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"] and [\"12345-12349\"].", + "items": { + "type": "string" + } + } + } + } + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#firewall" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.firewalls.insert", + "compute.firewalls.patch" + ] + } + }, + "network": { + "type": "string", + "description": "URL of the network to which this firewall is applied; provided by the client when the firewall is created." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "sourceRanges": { + "type": "array", + "description": "A list of IP address blocks expressed in CIDR format which this rule applies to. One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.", + "items": { + "type": "string" + } + }, + "sourceTags": { + "type": "array", + "description": "A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.", + "items": { + "type": "string" + } + }, + "targetTags": { + "type": "array", + "description": "A list of instance tags indicating sets of instances located on network which may make network connections as specified in allowed. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", + "items": { + "type": "string" + } + } + } + }, + "FirewallList": { + "id": "FirewallList", + "type": "object", + "description": "Contains a list of firewall resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The firewall resources.", + "items": { + "$ref": "Firewall" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#firewallList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "ForwardingRule": { + "id": "ForwardingRule", + "type": "object", + "description": "A ForwardingRule resource. A ForwardingRule resource specifies which pool of target VMs to forward a packet to if it matches the given [IPAddress, IPProtocol, portRange] tuple.", + "properties": { + "IPAddress": { + "type": "string", + "description": "Value of the reserved IP address that this forwarding rule is serving on behalf of. For global forwarding rules, the address must be a global IP; for regional forwarding rules, the address must live in the same region as the forwarding rule. If left empty (default value), an ephemeral IP from the same scope (global or regional) will be assigned." + }, + "IPProtocol": { + "type": "string", + "description": "The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'.", + "enum": [ + "AH", + "ESP", + "SCTP", + "TCP", + "UDP" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#forwardingRule" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "portRange": { + "type": "string", + "description": "Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets addressed to ports in the specified range will be forwarded to 'target'. If 'portRange' is left empty (default value), all ports are forwarded. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges." + }, + "region": { + "type": "string", + "description": "URL of the region where the regional forwarding rule resides (output only). This field is not applicable to global forwarding rules." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "target": { + "type": "string", + "description": "The URL of the target resource to receive the matched traffic. For regional forwarding rules, this target must live in the same region as the forwarding rule. For global forwarding rules, this target must be a global TargetHttpProxy resource." + } + } + }, + "ForwardingRuleAggregatedList": { + "id": "ForwardingRuleAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped forwarding rule lists.", + "additionalProperties": { + "$ref": "ForwardingRulesScopedList", + "description": "Name of the scope containing this set of addresses." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#forwardingRuleAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "ForwardingRuleList": { + "id": "ForwardingRuleList", + "type": "object", + "description": "Contains a list of ForwardingRule resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The ForwardingRule resources.", + "items": { + "$ref": "ForwardingRule" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#forwardingRuleList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "ForwardingRulesScopedList": { + "id": "ForwardingRulesScopedList", + "type": "object", + "properties": { + "forwardingRules": { + "type": "array", + "description": "List of forwarding rules contained in this scope.", + "items": { + "$ref": "ForwardingRule" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of forwarding rules when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "HealthCheckReference": { + "id": "HealthCheckReference", + "type": "object", + "properties": { + "healthCheck": { + "type": "string" + } + } + }, + "HealthStatus": { + "id": "HealthStatus", + "type": "object", + "properties": { + "healthState": { + "type": "string", + "description": "Health state of the instance.", + "enum": [ + "HEALTHY", + "UNHEALTHY" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "instance": { + "type": "string", + "description": "URL of the instance resource." + }, + "ipAddress": { + "type": "string", + "description": "The IP address represented by this resource." + }, + "port": { + "type": "integer", + "description": "The port on the instance.", + "format": "int32" + } + } + }, + "HostRule": { + "id": "HostRule", + "type": "object", + "description": "A host-matching rule for a URL. If matched, will use the named PathMatcher to select the BackendService.", + "properties": { + "description": { + "type": "string" + }, + "hosts": { + "type": "array", + "description": "The list of host patterns to match. They must be valid hostnames except that they may start with *. or *-. The * acts like a glob and will match any string of atoms (separated by .s and -s) to the left.", + "items": { + "type": "string" + } + }, + "pathMatcher": { + "type": "string", + "description": "The name of the PathMatcher to match the path portion of the URL, if the this HostRule matches the URL's host portion." + } + } + }, + "HttpHealthCheck": { + "id": "HttpHealthCheck", + "type": "object", + "description": "An HttpHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTP.", + "properties": { + "checkIntervalSec": { + "type": "integer", + "description": "How often (in seconds) to send a health check. The default value is 5 seconds.", + "format": "int32" + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "healthyThreshold": { + "type": "integer", + "description": "A so-far unhealthy VM will be marked healthy after this many consecutive successes. The default value is 2.", + "format": "int32" + }, + "host": { + "type": "string", + "description": "The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#httpHealthCheck" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "port": { + "type": "integer", + "description": "The TCP port number for the HTTP health check request. The default value is 80.", + "format": "int32" + }, + "requestPath": { + "type": "string", + "description": "The request path of the HTTP health check request. The default value is \"/\"." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "timeoutSec": { + "type": "integer", + "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds.", + "format": "int32" + }, + "unhealthyThreshold": { + "type": "integer", + "description": "A so-far healthy VM will be marked unhealthy after this many consecutive failures. The default value is 2.", + "format": "int32" + } + } + }, + "HttpHealthCheckList": { + "id": "HttpHealthCheckList", + "type": "object", + "description": "Contains a list of HttpHealthCheck resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The HttpHealthCheck resources.", + "items": { + "$ref": "HttpHealthCheck" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#httpHealthCheckList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "Image": { + "id": "Image", + "type": "object", + "description": "A disk image resource.", + "properties": { + "archiveSizeBytes": { + "type": "string", + "description": "Size of the image tar.gz archive stored in Google Cloud Storage (in bytes).", + "format": "int64" + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "The deprecation status associated with this image." + }, + "description": { + "type": "string", + "description": "Textual description of the resource; provided by the client when the resource is created." + }, + "diskSizeGb": { + "type": "string", + "description": "Size of the image when restored onto a disk (in GiB).", + "format": "int64" + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#image" + }, + "licenses": { + "type": "array", + "description": "Public visible licenses.", + "items": { + "type": "string" + } + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.images.insert" + ] + } + }, + "rawDisk": { + "type": "object", + "description": "The raw disk image parameters.", + "properties": { + "containerType": { + "type": "string", + "description": "The format used to encode and transmit the block device. Should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.", + "enum": [ + "TAR" + ], + "enumDescriptions": [ + "" + ] + }, + "sha1Checksum": { + "type": "string", + "description": "An optional SHA1 checksum of the disk image before unpackaging; provided by the client when the disk image is created.", + "pattern": "[a-f0-9]{40}" + }, + "source": { + "type": "string", + "description": "The full Google Cloud Storage URL where the disk image is stored; provided by the client when the disk image is created.", + "annotations": { + "required": [ + "compute.images.insert" + ] + } + } + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "sourceDisk": { + "type": "string", + "description": "The source disk used to create this image." + }, + "sourceDiskId": { + "type": "string", + "description": "The 'id' value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." + }, + "sourceType": { + "type": "string", + "description": "Must be \"RAW\"; provided by the client when the disk image is created.", + "default": "RAW", + "enum": [ + "RAW" + ], + "enumDescriptions": [ + "" + ] + }, + "status": { + "type": "string", + "description": "Status of the image (output only). It will be one of the following READY - after image has been successfully created and is ready for use FAILED - if creating the image fails for some reason PENDING - the image creation is in progress An image can be used to create other resources suck as instances only after the image has been successfully created and the status is set to READY.", + "enum": [ + "FAILED", + "PENDING", + "READY" + ], + "enumDescriptions": [ + "", + "", + "" + ] + } + } + }, + "ImageList": { + "id": "ImageList", + "type": "object", + "description": "Contains a list of disk image resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The disk image resources.", + "items": { + "$ref": "Image" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#imageList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "Instance": { + "id": "Instance", + "type": "object", + "description": "An instance resource.", + "properties": { + "canIpForward": { + "type": "boolean", + "description": "Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false." + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "disks": { + "type": "array", + "description": "Array of disks associated with this instance. Persistent disks must be created before you can assign them.", + "items": { + "$ref": "AttachedDisk" + } + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#instance" + }, + "machineType": { + "type": "string", + "description": "URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.", + "annotations": { + "required": [ + "compute.instances.insert" + ] + } + }, + "metadata": { + "$ref": "Metadata", + "description": "Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information." + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.instances.insert" + ] + } + }, + "networkInterfaces": { + "type": "array", + "description": "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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.", + "items": { + "$ref": "NetworkInterface" + } + }, + "scheduling": { + "$ref": "Scheduling", + "description": "Scheduling options for this instance." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + }, + "serviceAccounts": { + "type": "array", + "description": "A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.", + "items": { + "$ref": "ServiceAccount" + } + }, + "status": { + "type": "string", + "description": "Instance status. One of the following values: \"PROVISIONING\", \"STAGING\", \"RUNNING\", \"STOPPING\", \"STOPPED\", \"TERMINATED\" (output only).", + "enum": [ + "PROVISIONING", + "RUNNING", + "STAGING", + "STOPPED", + "STOPPING", + "TERMINATED" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "" + ] + }, + "statusMessage": { + "type": "string", + "description": "An optional, human-readable explanation of the status (output only)." + }, + "tags": { + "$ref": "Tags", + "description": "A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." + }, + "zone": { + "type": "string", + "description": "URL of the zone where the instance resides (output only)." + } + } + }, + "InstanceAggregatedList": { + "id": "InstanceAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped instance lists.", + "additionalProperties": { + "$ref": "InstancesScopedList", + "description": "Name of the scope containing this set of instances." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#instanceAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "InstanceList": { + "id": "InstanceList", + "type": "object", + "description": "Contains a list of instance resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "A list of instance resources.", + "items": { + "$ref": "Instance" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#instanceList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "InstanceProperties": { + "id": "InstanceProperties", + "type": "object", + "description": "", + "properties": { + "canIpForward": { + "type": "boolean", + "description": "Allows instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false." + }, + "description": { + "type": "string", + "description": "An optional textual description for the instances created based on the instance template resource; provided by the client when the template is created." + }, + "disks": { + "type": "array", + "description": "Array of disks associated with instance created based on this template.", + "items": { + "$ref": "AttachedDisk" + } + }, + "machineType": { + "type": "string", + "description": "Name of the machine type resource describing which machine type to use to host the instances created based on this template; provided by the client when the instance template is created.", + "annotations": { + "required": [ + "compute.instanceTemplates.insert" + ] + } + }, + "metadata": { + "$ref": "Metadata", + "description": "Metadata key/value pairs assigned to instances created based on this template. Consists of custom metadata or predefined keys; see Instance documentation for more information." + }, + "networkInterfaces": { + "type": "array", + "description": "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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instances created based based on this template will have no external internet access.", + "items": { + "$ref": "NetworkInterface" + } + }, + "scheduling": { + "$ref": "Scheduling", + "description": "Scheduling options for the instances created based on this template." + }, + "serviceAccounts": { + "type": "array", + "description": "A list of service accounts each with specified scopes, for which access tokens are to be made available to the instances created based on this template, through metadata queries.", + "items": { + "$ref": "ServiceAccount" + } + }, + "tags": { + "$ref": "Tags", + "description": "A list of tags to be applied to the instances created based on this template used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." + } + } + }, + "InstanceReference": { + "id": "InstanceReference", + "type": "object", + "properties": { + "instance": { + "type": "string" + } + } + }, + "InstanceTemplate": { + "id": "InstanceTemplate", + "type": "object", + "description": "An Instance Template resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the instance template resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#instanceTemplate" + }, + "name": { + "type": "string", + "description": "Name of the instance template resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.instanceTemplates.insert" + ] + } + }, + "properties": { + "$ref": "InstanceProperties", + "description": "The instance properties portion of this instance template resource." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + } + } + }, + "InstanceTemplateList": { + "id": "InstanceTemplateList", + "type": "object", + "description": "Contains a list of instance template resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "A list of instance template resources.", + "items": { + "$ref": "InstanceTemplate" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#instanceTemplateList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "InstancesScopedList": { + "id": "InstancesScopedList", + "type": "object", + "properties": { + "instances": { + "type": "array", + "description": "List of instances contained in this scope.", + "items": { + "$ref": "Instance" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of instances when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "License": { + "id": "License", + "type": "object", + "description": "A license resource.", + "properties": { + "chargesUseFee": { + "type": "boolean", + "description": "If true, the customer will be charged license fee for running software that contains this license on an instance." + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#license" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.images.insert" + ] + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + } + } + }, + "MachineType": { + "id": "MachineType", + "type": "object", + "description": "A machine type resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "The deprecation status associated with this machine type." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource." + }, + "guestCpus": { + "type": "integer", + "description": "Count of CPUs exposed to the instance.", + "format": "int32" + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "imageSpaceGb": { + "type": "integer", + "description": "Space allotted for the image, defined in GB.", + "format": "int32" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#machineType" + }, + "maximumPersistentDisks": { + "type": "integer", + "description": "Maximum persistent disks allowed.", + "format": "int32" + }, + "maximumPersistentDisksSizeGb": { + "type": "string", + "description": "Maximum total persistent disks size (GB) allowed.", + "format": "int64" + }, + "memoryMb": { + "type": "integer", + "description": "Physical memory assigned to the instance, defined in MB.", + "format": "int32" + }, + "name": { + "type": "string", + "description": "Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "scratchDisks": { + "type": "array", + "description": "List of extended scratch disks assigned to the instance.", + "items": { + "type": "object", + "properties": { + "diskGb": { + "type": "integer", + "description": "Size of the scratch disk, defined in GB.", + "format": "int32" + } + } + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "zone": { + "type": "string", + "description": "Url of the zone where the machine type resides (output only)." + } + } + }, + "MachineTypeAggregatedList": { + "id": "MachineTypeAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped machine type lists.", + "additionalProperties": { + "$ref": "MachineTypesScopedList", + "description": "Name of the scope containing this set of machine types." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#machineTypeAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "MachineTypeList": { + "id": "MachineTypeList", + "type": "object", + "description": "Contains a list of machine type resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The machine type resources.", + "items": { + "$ref": "MachineType" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#machineTypeList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "MachineTypesScopedList": { + "id": "MachineTypesScopedList", + "type": "object", + "properties": { + "machineTypes": { + "type": "array", + "description": "List of machine types contained in this scope.", + "items": { + "$ref": "MachineType" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of machine types when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "Metadata": { + "id": "Metadata", + "type": "object", + "description": "A metadata key/value entry.", + "properties": { + "fingerprint": { + "type": "string", + "description": "Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.", + "format": "byte" + }, + "items": { + "type": "array", + "description": "Array of key/value pairs. The total size of all keys and values must be less than 512 KB.", + "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 32768 bytes.", + "annotations": { + "required": [ + "compute.instances.insert", + "compute.projects.setCommonInstanceMetadata" + ] + } + } + } + } + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#metadata" + } + } + }, + "Network": { + "id": "Network", + "type": "object", + "description": "A network resource.", + "properties": { + "IPv4Range": { + "type": "string", + "description": "Required; The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", + "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}", + "annotations": { + "required": [ + "compute.networks.insert" + ] + } + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "gatewayIPv4": { + "type": "string", + "description": "An optional address that is used for default routing to other networks. This must be within the range specified by IPv4Range, and is typically the first usable address in that range. If not specified, the default value is the first usable address in IPv4Range.", + "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}" + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#network" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.networks.insert" + ] + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + } + } + }, + "NetworkInterface": { + "id": "NetworkInterface", + "type": "object", + "description": "A network interface resource attached to an instance.", + "properties": { + "accessConfigs": { + "type": "array", + "description": "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. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.", + "items": { + "$ref": "AccessConfig" + } + }, + "name": { + "type": "string", + "description": "Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only)." + }, + "network": { + "type": "string", + "description": "URL of the network resource attached to this interface.", + "annotations": { + "required": [ + "compute.instances.insert" + ] + } + }, + "networkIP": { + "type": "string", + "description": "An optional IPV4 internal network address assigned to the instance for this network interface (output only)." + } + } + }, + "NetworkList": { + "id": "NetworkList", + "type": "object", + "description": "Contains a list of network resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The network resources.", + "items": { + "$ref": "Network" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#networkList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "Operation": { + "id": "Operation", + "type": "object", + "description": "An operation resource, used to manage asynchronous API requests.", + "properties": { + "clientOperationId": { + "type": "string", + "description": "An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only)." + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "endTime": { + "type": "string", + "description": "The time that this operation was completed. This is in RFC 3339 format (output only)." + }, + "error": { + "type": "object", + "description": "If errors occurred during processing of this operation, this field will be populated (output only).", + "properties": { + "errors": { + "type": "array", + "description": "The array of errors encountered while processing this operation.", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The error type identifier for this error." + }, + "location": { + "type": "string", + "description": "Indicates the field in the request which caused the error. This property is optional." + }, + "message": { + "type": "string", + "description": "An optional, human-readable error message." + } + } + } + } + } + }, + "httpErrorMessage": { + "type": "string", + "description": "If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only)." + }, + "httpErrorStatusCode": { + "type": "integer", + "description": "If operation fails, the HTTP error status code returned, e.g. 404. (output only).", + "format": "int32" + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "insertTime": { + "type": "string", + "description": "The time that this operation was requested. This is in RFC 3339 format (output only)." + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#operation" + }, + "name": { + "type": "string", + "description": "Name of the resource (output only)." + }, + "operationType": { + "type": "string", + "description": "Type of the operation. Examples include \"insert\", \"update\", and \"delete\" (output only)." + }, + "progress": { + "type": "integer", + "description": "An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).", + "format": "int32" + }, + "region": { + "type": "string", + "description": "URL of the region where the operation resides (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "startTime": { + "type": "string", + "description": "The time that this operation was started by the server. This is in RFC 3339 format (output only)." + }, + "status": { + "type": "string", + "description": "Status of the operation. Can be one of the following: \"PENDING\", \"RUNNING\", or \"DONE\" (output only).", + "enum": [ + "DONE", + "PENDING", + "RUNNING" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, + "statusMessage": { + "type": "string", + "description": "An optional textual description of the current status of the operation (output only)." + }, + "targetId": { + "type": "string", + "description": "Unique target id which identifies a particular incarnation of the target (output only).", + "format": "uint64" + }, + "targetLink": { + "type": "string", + "description": "URL of the resource the operation is mutating (output only)." + }, + "user": { + "type": "string", + "description": "User who requested the operation, for example \"user@example.com\" (output only)." + }, + "warnings": { + "type": "array", + "description": "If warning messages generated during processing of this operation, this field will be populated (output only).", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + }, + "zone": { + "type": "string", + "description": "URL of the zone where the operation resides (output only)." + } + } + }, + "OperationAggregatedList": { + "id": "OperationAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped operation lists.", + "additionalProperties": { + "$ref": "OperationsScopedList", + "description": "Name of the scope containing this set of operations." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#operationAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "OperationList": { + "id": "OperationList", + "type": "object", + "description": "Contains a list of operation resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The operation resources.", + "items": { + "$ref": "Operation" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#operationList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "OperationsScopedList": { + "id": "OperationsScopedList", + "type": "object", + "properties": { + "operations": { + "type": "array", + "description": "List of operations contained in this scope.", + "items": { + "$ref": "Operation" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of operations when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "PathMatcher": { + "id": "PathMatcher", + "type": "object", + "description": "A matcher for the path portion of the URL. The BackendService from the longest-matched rule will serve the URL. If no rule was matched, the default_service will be used.", + "properties": { + "defaultService": { + "type": "string", + "description": "The URL to the BackendService resource. This will be used if none of the 'pathRules' defined by this PathMatcher is met by the URL's path portion." + }, + "description": { + "type": "string" + }, + "name": { + "type": "string", + "description": "The name to which this PathMatcher is referred by the HostRule." + }, + "pathRules": { + "type": "array", + "description": "The list of path rules.", + "items": { + "$ref": "PathRule" + } + } + } + }, + "PathRule": { + "id": "PathRule", + "type": "object", + "description": "A path-matching rule for a URL. If matched, will use the specified BackendService to handle the traffic arriving at this URL.", + "properties": { + "paths": { + "type": "array", + "description": "The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here.", + "items": { + "type": "string" + } + }, + "service": { + "type": "string", + "description": "The URL of the BackendService resource if this rule is matched." + } + } + }, + "Project": { + "id": "Project", + "type": "object", + "description": "A project resource. Projects can be created only in the APIs Console. Unless marked otherwise, values can only be modified in the console.", + "properties": { + "commonInstanceMetadata": { + "$ref": "Metadata", + "description": "Metadata key/value pairs available to all instances contained in this project." + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#project" + }, + "name": { + "type": "string", + "description": "Name of the resource." + }, + "quotas": { + "type": "array", + "description": "Quotas assigned to this project.", + "items": { + "$ref": "Quota" + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "usageExportLocation": { + "$ref": "UsageExportLocation", + "description": "The location in Cloud Storage and naming method of the daily usage report." + } + } + }, + "Quota": { + "id": "Quota", + "type": "object", + "description": "A quotas entry.", + "properties": { + "limit": { + "type": "number", + "description": "Quota limit for this metric.", + "format": "double" + }, + "metric": { + "type": "string", + "description": "Name of the quota metric.", + "enum": [ + "BACKEND_SERVICES", + "CPUS", + "DISKS", + "DISKS_TOTAL_GB", + "EPHEMERAL_ADDRESSES", + "FIREWALLS", + "FORWARDING_RULES", + "HEALTH_CHECKS", + "IMAGES", + "IMAGES_TOTAL_GB", + "INSTANCES", + "IN_USE_ADDRESSES", + "KERNELS", + "KERNELS_TOTAL_GB", + "LOCAL_SSD_TOTAL_GB", + "NETWORKS", + "OPERATIONS", + "ROUTES", + "SNAPSHOTS", + "SSD_TOTAL_GB", + "STATIC_ADDRESSES", + "TARGET_HTTP_PROXIES", + "TARGET_INSTANCES", + "TARGET_POOLS", + "URL_MAPS" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "usage": { + "type": "number", + "description": "Current usage of this metric.", + "format": "double" + } + } + }, + "Region": { + "id": "Region", + "type": "object", + "description": "Region resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "The deprecation status associated with this region." + }, + "description": { + "type": "string", + "description": "Textual description of the resource." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#region" + }, + "name": { + "type": "string", + "description": "Name of the resource." + }, + "quotas": { + "type": "array", + "description": "Quotas assigned to this region.", + "items": { + "$ref": "Quota" + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "status": { + "type": "string", + "description": "Status of the region, \"UP\" or \"DOWN\".", + "enum": [ + "DOWN", + "UP" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "zones": { + "type": "array", + "description": "A list of zones homed in this region, in the form of resource URLs.", + "items": { + "type": "string" + } + } + } + }, + "RegionList": { + "id": "RegionList", + "type": "object", + "description": "Contains a list of region resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The region resources.", + "items": { + "$ref": "Region" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#regionList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "ResourceGroupReference": { + "id": "ResourceGroupReference", + "type": "object", + "properties": { + "group": { + "type": "string", + "description": "A URI referencing one of the resource views listed in the backend service." + } + } + }, + "Route": { + "id": "Route", + "type": "object", + "description": "The route resource. A Route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with VMs by tag and the set of Routes for a particular VM is called its routing table. For each packet leaving a VM, the system searches that VM's routing table for a single best matching Route. Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the Route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching Routes. The packet is then forwarded as specified by the next_hop field of the winning Route -- either to another VM destination, a VM gateway or a GCE operated gateway. Packets that do not match any Route in the sending VM's routing table will be dropped.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "destRange": { + "type": "string", + "description": "Which packets does this route apply to?", + "annotations": { + "required": [ + "compute.routes.insert" + ] + } + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#route" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.routes.insert" + ] + } + }, + "network": { + "type": "string", + "description": "URL of the network to which this route is applied; provided by the client when the route is created.", + "annotations": { + "required": [ + "compute.routes.insert" + ] + } + }, + "nextHopGateway": { + "type": "string", + "description": "The URL to a gateway that should handle matching packets." + }, + "nextHopInstance": { + "type": "string", + "description": "The URL to an instance that should handle matching packets." + }, + "nextHopIp": { + "type": "string", + "description": "The network IP address of an instance that should handle matching packets." + }, + "nextHopNetwork": { + "type": "string", + "description": "The URL of the local network if it should handle matching packets." + }, + "priority": { + "type": "integer", + "description": "Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values.", + "format": "uint32", + "annotations": { + "required": [ + "compute.routes.insert" + ] + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "tags": { + "type": "array", + "description": "A list of instance tags to which this route applies.", + "items": { + "type": "string" + }, + "annotations": { + "required": [ + "compute.routes.insert" + ] + } + }, + "warnings": { + "type": "array", + "description": "If potential misconfigurations are detected for this route, this field will be populated with warning messages.", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + } + }, + "RouteList": { + "id": "RouteList", + "type": "object", + "description": "Contains a list of route resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The route resources.", + "items": { + "$ref": "Route" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#routeList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "Scheduling": { + "id": "Scheduling", + "type": "object", + "description": "Scheduling options for an Instance.", + "properties": { + "automaticRestart": { + "type": "boolean", + "description": "Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user)." + }, + "onHostMaintenance": { + "type": "string", + "description": "How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.", + "enum": [ + "MIGRATE", + "TERMINATE" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, + "SerialPortOutput": { + "id": "SerialPortOutput", + "type": "object", + "description": "An instance serial console output.", + "properties": { + "contents": { + "type": "string", + "description": "The contents of the console output." + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#serialPortOutput" + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + } + } + }, + "ServiceAccount": { + "id": "ServiceAccount", + "type": "object", + "description": "A service account.", + "properties": { + "email": { + "type": "string", + "description": "Email address of the service account." + }, + "scopes": { + "type": "array", + "description": "The list of scopes to be made available for this service account.", + "items": { + "type": "string" + } + } + } + }, + "Snapshot": { + "id": "Snapshot", + "type": "object", + "description": "A persistent disk snapshot resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "diskSizeGb": { + "type": "string", + "description": "Size of the persistent disk snapshot, specified in GB (output only).", + "format": "int64" + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#snapshot" + }, + "licenses": { + "type": "array", + "description": "Public visible licenses.", + "items": { + "type": "string" + } + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "sourceDisk": { + "type": "string", + "description": "The source disk used to create this snapshot." + }, + "sourceDiskId": { + "type": "string", + "description": "The 'id' value of the disk used to create this snapshot. This value may be used to determine whether the snapshot was taken from the current or a previous instance of a given disk name." + }, + "status": { + "type": "string", + "description": "The status of the persistent disk snapshot (output only).", + "enum": [ + "CREATING", + "DELETING", + "FAILED", + "READY", + "UPLOADING" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ] + }, + "storageBytes": { + "type": "string", + "description": "A size of the the storage used by the snapshot. As snapshots share storage this number is expected to change with snapshot creation/deletion.", + "format": "int64" + }, + "storageBytesStatus": { + "type": "string", + "description": "An indicator whether storageBytes is in a stable state, or it is being adjusted as a result of shared storage reallocation.", + "enum": [ + "UPDATING", + "UP_TO_DATE" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, + "SnapshotList": { + "id": "SnapshotList", + "type": "object", + "description": "Contains a list of persistent disk snapshot resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The persistent snapshot resources.", + "items": { + "$ref": "Snapshot" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#snapshotList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "Tags": { + "id": "Tags", + "type": "object", + "description": "A set of instance tags.", + "properties": { + "fingerprint": { + "type": "string", + "description": "Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.", + "format": "byte" + }, + "items": { + "type": "array", + "description": "An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035.", + "items": { + "type": "string" + } + } + } + }, + "TargetHttpProxy": { + "id": "TargetHttpProxy", + "type": "object", + "description": "A TargetHttpProxy resource. This resource defines an HTTP proxy.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#targetHttpProxy" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "urlMap": { + "type": "string", + "description": "URL to the UrlMap resource that defines the mapping from URL to the BackendService." + } + } + }, + "TargetHttpProxyList": { + "id": "TargetHttpProxyList", + "type": "object", + "description": "Contains a list of TargetHttpProxy resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The TargetHttpProxy resources.", + "items": { + "$ref": "TargetHttpProxy" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetHttpProxyList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "TargetInstance": { + "id": "TargetInstance", + "type": "object", + "description": "A TargetInstance resource. This resource defines an endpoint VM that terminates traffic of certain protocols.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "instance": { + "type": "string", + "description": "The URL to the instance that terminates the relevant traffic." + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#targetInstance" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "natPolicy": { + "type": "string", + "description": "NAT option controlling how IPs are NAT'ed to the VM. Currently only NO_NAT (default value) is supported.", + "enum": [ + "NO_NAT" + ], + "enumDescriptions": [ + "" + ] + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "zone": { + "type": "string", + "description": "URL of the zone where the target instance resides (output only)." + } + } + }, + "TargetInstanceAggregatedList": { + "id": "TargetInstanceAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped target instance lists.", + "additionalProperties": { + "$ref": "TargetInstancesScopedList", + "description": "Name of the scope containing this set of target instances." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetInstanceAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "TargetInstanceList": { + "id": "TargetInstanceList", + "type": "object", + "description": "Contains a list of TargetInstance resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The TargetInstance resources.", + "items": { + "$ref": "TargetInstance" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetInstanceList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "TargetInstancesScopedList": { + "id": "TargetInstancesScopedList", + "type": "object", + "properties": { + "targetInstances": { + "type": "array", + "description": "List of target instances contained in this scope.", + "items": { + "$ref": "TargetInstance" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "TargetPool": { + "id": "TargetPool", + "type": "object", + "description": "A TargetPool resource. This resource defines a pool of VMs, associated HttpHealthCheck resources, and the fallback TargetPool.", + "properties": { + "backupPool": { + "type": "string", + "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its 'failoverRatio' field is properly set to a value between [0, 1].\n\n'backupPool' and 'failoverRatio' together define the fallback behavior of the primary target pool: if the ratio of the healthy VMs in the primary pool is at or below 'failoverRatio', traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where 'failoverRatio' and 'backupPool' are not set, or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool 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." + }, + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "failoverRatio": { + "type": "number", + "description": "This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1].\n\nIf set, 'backupPool' must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy VMs in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.\n\nIn case where 'failoverRatio' is not set or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool 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.", + "format": "float" + }, + "healthChecks": { + "type": "array", + "description": "A list of URLs to the HttpHealthCheck resource. A member VM in this pool is considered healthy if and only if all specified health checks pass. An empty list means all member VMs will be considered healthy at all times.", + "items": { + "type": "string" + } + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "instances": { + "type": "array", + "description": "A list of resource URLs to the member VMs serving this pool. They must live in zones contained in the same region as this pool.", + "items": { + "type": "string" + } + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#targetPool" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "region": { + "type": "string", + "description": "URL of the region where the target pool resides (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "sessionAffinity": { + "type": "string", + "description": "Sesssion affinity option, must be one of the following values: 'NONE': Connections from the same client IP may go to any VM in the pool; 'CLIENT_IP': Connections from the same client IP will go to the same VM in the pool while that VM remains healthy. 'CLIENT_IP_PROTO': Connections from the same client IP with the same IP protocol will go to the same VM in the pool while that VM remains healthy.", + "enum": [ + "CLIENT_IP", + "CLIENT_IP_PROTO", + "NONE" + ], + "enumDescriptions": [ + "", + "", + "" + ] + } + } + }, + "TargetPoolAggregatedList": { + "id": "TargetPoolAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "object", + "description": "A map of scoped target pool lists.", + "additionalProperties": { + "$ref": "TargetPoolsScopedList", + "description": "Name of the scope containing this set of target pools." + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetPoolAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "TargetPoolInstanceHealth": { + "id": "TargetPoolInstanceHealth", + "type": "object", + "properties": { + "healthStatus": { + "type": "array", + "items": { + "$ref": "HealthStatus" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetPoolInstanceHealth" + } + } + }, + "TargetPoolList": { + "id": "TargetPoolList", + "type": "object", + "description": "Contains a list of TargetPool resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The TargetPool resources.", + "items": { + "$ref": "TargetPool" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#targetPoolList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "TargetPoolsAddHealthCheckRequest": { + "id": "TargetPoolsAddHealthCheckRequest", + "type": "object", + "properties": { + "healthChecks": { + "type": "array", + "description": "Health check URLs to be added to targetPool.", + "items": { + "$ref": "HealthCheckReference" + } + } + } + }, + "TargetPoolsAddInstanceRequest": { + "id": "TargetPoolsAddInstanceRequest", + "type": "object", + "properties": { + "instances": { + "type": "array", + "description": "URLs of the instances to be added to targetPool.", + "items": { + "$ref": "InstanceReference" + } + } + } + }, + "TargetPoolsRemoveHealthCheckRequest": { + "id": "TargetPoolsRemoveHealthCheckRequest", + "type": "object", + "properties": { + "healthChecks": { + "type": "array", + "description": "Health check URLs to be removed from targetPool.", + "items": { + "$ref": "HealthCheckReference" + } + } + } + }, + "TargetPoolsRemoveInstanceRequest": { + "id": "TargetPoolsRemoveInstanceRequest", + "type": "object", + "properties": { + "instances": { + "type": "array", + "description": "URLs of the instances to be removed from targetPool.", + "items": { + "$ref": "InstanceReference" + } + } + } + }, + "TargetPoolsScopedList": { + "id": "TargetPoolsScopedList", + "type": "object", + "properties": { + "targetPools": { + "type": "array", + "description": "List of target pools contained in this scope.", + "items": { + "$ref": "TargetPool" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "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", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "Metadata for this warning in 'key: value' format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "A key for the warning data." + }, + "value": { + "type": "string", + "description": "A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "Optional human-readable details for this warning." + } + } + } + } + }, + "TargetReference": { + "id": "TargetReference", + "type": "object", + "properties": { + "target": { + "type": "string" + } + } + }, + "TestFailure": { + "id": "TestFailure", + "type": "object", + "properties": { + "actualService": { + "type": "string" + }, + "expectedService": { + "type": "string" + }, + "host": { + "type": "string" + }, + "path": { + "type": "string" + } + } + }, + "UrlMap": { + "id": "UrlMap", + "type": "object", + "description": "A UrlMap resource. This resource defines the mapping from URL to the BackendService resource, based on the \"longest-match\" of the URL's host and path.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "defaultService": { + "type": "string", + "description": "The URL of the BackendService resource if none of the hostRules match." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource; provided by the client when the resource is created." + }, + "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 UrlMap. An up-to-date fingerprint must be provided in order to update the UrlMap.", + "format": "byte" + }, + "hostRules": { + "type": "array", + "description": "The list of HostRules to use against the URL.", + "items": { + "$ref": "HostRule" + } + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#urlMap" + }, + "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.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" + }, + "pathMatchers": { + "type": "array", + "description": "The list of named PathMatchers to use against the URL.", + "items": { + "$ref": "PathMatcher" + } + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "tests": { + "type": "array", + "description": "The list of expected URL mappings. Request to update this UrlMap will succeed only all of the test cases pass.", + "items": { + "$ref": "UrlMapTest" + } + } + } + }, + "UrlMapList": { + "id": "UrlMapList", + "type": "object", + "description": "Contains a list of UrlMap resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The UrlMap resources.", + "items": { + "$ref": "UrlMap" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#urlMapList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + }, + "UrlMapReference": { + "id": "UrlMapReference", + "type": "object", + "properties": { + "urlMap": { + "type": "string" + } + } + }, + "UrlMapTest": { + "id": "UrlMapTest", + "type": "object", + "description": "Message for the expected URL mappings.", + "properties": { + "description": { + "type": "string", + "description": "Description of this test case." + }, + "host": { + "type": "string", + "description": "Host portion of the URL." + }, + "path": { + "type": "string", + "description": "Path portion of the URL." + }, + "service": { + "type": "string", + "description": "Expected BackendService resource the given URL should be mapped to." + } + } + }, + "UrlMapValidationResult": { + "id": "UrlMapValidationResult", + "type": "object", + "description": "Message representing the validation result for a UrlMap.", + "properties": { + "loadErrors": { + "type": "array", + "items": { + "type": "string" + } + }, + "loadSucceeded": { + "type": "boolean", + "description": "Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' indicates the reasons." + }, + "testFailures": { + "type": "array", + "items": { + "$ref": "TestFailure" + } + }, + "testPassed": { + "type": "boolean", + "description": "If successfully loaded, this field indicates whether the test passed. If false, 'testFailures's indicate the reason of failure." + } + } + }, + "UrlMapsValidateRequest": { + "id": "UrlMapsValidateRequest", + "type": "object", + "properties": { + "resource": { + "$ref": "UrlMap", + "description": "Content of the UrlMap to be validated." + } + } + }, + "UrlMapsValidateResponse": { + "id": "UrlMapsValidateResponse", + "type": "object", + "properties": { + "result": { + "$ref": "UrlMapValidationResult" + } + } + }, + "UsageExportLocation": { + "id": "UsageExportLocation", + "type": "object", + "description": "The location in Cloud Storage and naming method of the daily usage report. Contains bucket_name and report_name prefix.", + "properties": { + "bucketName": { + "type": "string", + "description": "The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This is simply the bucket name, with no \"gs://\" or \"https://storage.googleapis.com/\" in front of it." + }, + "reportNamePrefix": { + "type": "string", + "description": "An optional prefix for the name of the usage report object stored in bucket_name. If not supplied, defaults to \"usage_\". The report is stored as a CSV file named _gce_.csv. where is the day of the usage according to Pacific Time. The prefix should conform to Cloud Storage object naming conventions." + } + } + }, + "Zone": { + "id": "Zone", + "type": "object", + "description": "A zone resource.", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "Creation timestamp in RFC3339 text format (output only)." + }, + "deprecated": { + "$ref": "DeprecationStatus", + "description": "The deprecation status associated with this zone." + }, + "description": { + "type": "string", + "description": "Textual description of the resource." + }, + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only).", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "Type of the resource.", + "default": "compute#zone" + }, + "maintenanceWindows": { + "type": "array", + "description": "Scheduled maintenance windows for the zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable.", + "items": { + "type": "object", + "properties": { + "beginTime": { + "type": "string", + "description": "Begin time of the maintenance window, in RFC 3339 format." + }, + "description": { + "type": "string", + "description": "Textual description of the maintenance window." + }, + "endTime": { + "type": "string", + "description": "End time of the maintenance window, in RFC 3339 format." + }, + "name": { + "type": "string", + "description": "Name of the maintenance window." + } + } + } + }, + "name": { + "type": "string", + "description": "Name of the resource." + }, + "region": { + "type": "string", + "description": "Full URL reference to the region which hosts the zone (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for the resource (output only)." + }, + "status": { + "type": "string", + "description": "Status of the zone. \"UP\" or \"DOWN\".", + "enum": [ + "DOWN", + "UP" + ], + "enumDescriptions": [ + "", + "" + ] + } + } + }, + "ZoneList": { + "id": "ZoneList", + "type": "object", + "description": "Contains a list of zone resources.", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the resource; defined by the server (output only)." + }, + "items": { + "type": "array", + "description": "The zone resources.", + "items": { + "$ref": "Zone" + } + }, + "kind": { + "type": "string", + "description": "Type of resource.", + "default": "compute#zoneList" + }, + "nextPageToken": { + "type": "string", + "description": "A token used to continue a truncated list request (output only)." + }, + "selfLink": { + "type": "string", + "description": "Server defined URL for this resource (output only)." + } + } + } + }, + "resources": { + "addresses": { + "methods": { + "aggregatedList": { + "id": "compute.addresses.aggregatedList", + "path": "{project}/aggregated/addresses", + "httpMethod": "GET", + "description": "Retrieves the list of addresses grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "AddressAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.addresses.delete", + "path": "{project}/regions/{region}/addresses/{address}", + "httpMethod": "DELETE", + "description": "Deletes the specified address resource.", + "parameters": { + "address": { + "type": "string", + "description": "Name of the address resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "address" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.addresses.get", + "path": "{project}/regions/{region}/addresses/{address}", + "httpMethod": "GET", + "description": "Returns the specified address resource.", + "parameters": { + "address": { + "type": "string", + "description": "Name of the address resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "address" + ], + "response": { + "$ref": "Address" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.addresses.insert", + "path": "{project}/regions/{region}/addresses", + "httpMethod": "POST", + "description": "Creates an address resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "Address" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.addresses.list", + "path": "{project}/regions/{region}/addresses", + "httpMethod": "GET", + "description": "Retrieves the list of address resources contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "AddressList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "backendServices": { + "methods": { + "delete": { + "id": "compute.backendServices.delete", + "path": "{project}/global/backendServices/{backendService}", + "httpMethod": "DELETE", + "description": "Deletes the specified BackendService resource.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.backendServices.get", + "path": "{project}/global/backendServices/{backendService}", + "httpMethod": "GET", + "description": "Returns the specified BackendService resource.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "response": { + "$ref": "BackendService" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getHealth": { + "id": "compute.backendServices.getHealth", + "path": "{project}/global/backendServices/{backendService}/getHealth", + "httpMethod": "POST", + "description": "Gets the most recent health check results for this BackendService.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to which the queried instance belongs.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "request": { + "$ref": "ResourceGroupReference" + }, + "response": { + "$ref": "BackendServiceGroupHealth" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.backendServices.insert", + "path": "{project}/global/backendServices", + "httpMethod": "POST", + "description": "Creates a BackendService resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "BackendService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.backendServices.list", + "path": "{project}/global/backendServices", + "httpMethod": "GET", + "description": "Retrieves the list of BackendService resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "BackendServiceList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.backendServices.patch", + "path": "{project}/global/backendServices/{backendService}", + "httpMethod": "PATCH", + "description": "Update the entire content of the BackendService resource. This method supports patch semantics.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "request": { + "$ref": "BackendService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "id": "compute.backendServices.update", + "path": "{project}/global/backendServices/{backendService}", + "httpMethod": "PUT", + "description": "Update the entire content of the BackendService resource.", + "parameters": { + "backendService": { + "type": "string", + "description": "Name of the BackendService resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "backendService" + ], + "request": { + "$ref": "BackendService" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "diskTypes": { + "methods": { + "aggregatedList": { + "id": "compute.diskTypes.aggregatedList", + "path": "{project}/aggregated/diskTypes", + "httpMethod": "GET", + "description": "Retrieves the list of disk type resources grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "DiskTypeAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.diskTypes.get", + "path": "{project}/zones/{zone}/diskTypes/{diskType}", + "httpMethod": "GET", + "description": "Returns the specified disk type resource.", + "parameters": { + "diskType": { + "type": "string", + "description": "Name of the disk type resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "diskType" + ], + "response": { + "$ref": "DiskType" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.diskTypes.list", + "path": "{project}/zones/{zone}/diskTypes", + "httpMethod": "GET", + "description": "Retrieves the list of disk type resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "DiskTypeList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "disks": { + "methods": { + "aggregatedList": { + "id": "compute.disks.aggregatedList", + "path": "{project}/aggregated/disks", + "httpMethod": "GET", + "description": "Retrieves the list of disks grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "DiskAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "createSnapshot": { + "id": "compute.disks.createSnapshot", + "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", + "httpMethod": "POST", + "parameters": { + "disk": { + "type": "string", + "description": "Name of the persistent disk resource to snapshot.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "disk" + ], + "request": { + "$ref": "Snapshot" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "id": "compute.disks.delete", + "path": "{project}/zones/{zone}/disks/{disk}", + "httpMethod": "DELETE", + "description": "Deletes the specified persistent disk resource.", + "parameters": { + "disk": { + "type": "string", + "description": "Name of the persistent disk resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "disk" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.disks.get", + "path": "{project}/zones/{zone}/disks/{disk}", + "httpMethod": "GET", + "description": "Returns the specified persistent disk resource.", + "parameters": { + "disk": { + "type": "string", + "description": "Name of the persistent disk resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "disk" + ], + "response": { + "$ref": "Disk" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.disks.insert", + "path": "{project}/zones/{zone}/disks", + "httpMethod": "POST", + "description": "Creates a persistent disk resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "sourceImage": { + "type": "string", + "description": "Optional. Source image to restore onto a disk.", + "location": "query" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "request": { + "$ref": "Disk" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.disks.list", + "path": "{project}/zones/{zone}/disks", + "httpMethod": "GET", + "description": "Retrieves the list of persistent disk resources contained within the specified zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "DiskList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "firewalls": { + "methods": { + "delete": { + "id": "compute.firewalls.delete", + "path": "{project}/global/firewalls/{firewall}", + "httpMethod": "DELETE", + "description": "Deletes the specified firewall resource.", + "parameters": { + "firewall": { + "type": "string", + "description": "Name of the firewall resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "firewall" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.firewalls.get", + "path": "{project}/global/firewalls/{firewall}", + "httpMethod": "GET", + "description": "Returns the specified firewall resource.", + "parameters": { + "firewall": { + "type": "string", + "description": "Name of the firewall resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "firewall" + ], + "response": { + "$ref": "Firewall" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.firewalls.insert", + "path": "{project}/global/firewalls", + "httpMethod": "POST", + "description": "Creates a firewall resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Firewall" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.firewalls.list", + "path": "{project}/global/firewalls", + "httpMethod": "GET", + "description": "Retrieves the list of firewall resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "FirewallList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.firewalls.patch", + "path": "{project}/global/firewalls/{firewall}", + "httpMethod": "PATCH", + "description": "Updates the specified firewall resource with the data included in the request. This method supports patch semantics.", + "parameters": { + "firewall": { + "type": "string", + "description": "Name of the firewall resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "firewall" + ], + "request": { + "$ref": "Firewall" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "id": "compute.firewalls.update", + "path": "{project}/global/firewalls/{firewall}", + "httpMethod": "PUT", + "description": "Updates the specified firewall resource with the data included in the request.", + "parameters": { + "firewall": { + "type": "string", + "description": "Name of the firewall resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "firewall" + ], + "request": { + "$ref": "Firewall" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "forwardingRules": { + "methods": { + "aggregatedList": { + "id": "compute.forwardingRules.aggregatedList", + "path": "{project}/aggregated/forwardingRules", + "httpMethod": "GET", + "description": "Retrieves the list of forwarding rules grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ForwardingRuleAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.forwardingRules.delete", + "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + "httpMethod": "DELETE", + "description": "Deletes the specified ForwardingRule resource.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "forwardingRule" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.forwardingRules.get", + "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + "httpMethod": "GET", + "description": "Returns the specified ForwardingRule resource.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "forwardingRule" + ], + "response": { + "$ref": "ForwardingRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.forwardingRules.insert", + "path": "{project}/regions/{region}/forwardingRules", + "httpMethod": "POST", + "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "ForwardingRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.forwardingRules.list", + "path": "{project}/regions/{region}/forwardingRules", + "httpMethod": "GET", + "description": "Retrieves the list of ForwardingRule resources available to the specified project and region.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "ForwardingRuleList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setTarget": { + "id": "compute.forwardingRules.setTarget", + "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", + "httpMethod": "POST", + "description": "Changes target url for forwarding rule.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource in which target is to be set.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "forwardingRule" + ], + "request": { + "$ref": "TargetReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "globalAddresses": { + "methods": { + "delete": { + "id": "compute.globalAddresses.delete", + "path": "{project}/global/addresses/{address}", + "httpMethod": "DELETE", + "description": "Deletes the specified address resource.", + "parameters": { + "address": { + "type": "string", + "description": "Name of the address resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "address" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.globalAddresses.get", + "path": "{project}/global/addresses/{address}", + "httpMethod": "GET", + "description": "Returns the specified address resource.", + "parameters": { + "address": { + "type": "string", + "description": "Name of the address resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "address" + ], + "response": { + "$ref": "Address" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.globalAddresses.insert", + "path": "{project}/global/addresses", + "httpMethod": "POST", + "description": "Creates an address resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Address" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.globalAddresses.list", + "path": "{project}/global/addresses", + "httpMethod": "GET", + "description": "Retrieves the list of global address resources.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "AddressList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "globalForwardingRules": { + "methods": { + "delete": { + "id": "compute.globalForwardingRules.delete", + "path": "{project}/global/forwardingRules/{forwardingRule}", + "httpMethod": "DELETE", + "description": "Deletes the specified ForwardingRule resource.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "forwardingRule" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.globalForwardingRules.get", + "path": "{project}/global/forwardingRules/{forwardingRule}", + "httpMethod": "GET", + "description": "Returns the specified ForwardingRule resource.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "forwardingRule" + ], + "response": { + "$ref": "ForwardingRule" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.globalForwardingRules.insert", + "path": "{project}/global/forwardingRules", + "httpMethod": "POST", + "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "ForwardingRule" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.globalForwardingRules.list", + "path": "{project}/global/forwardingRules", + "httpMethod": "GET", + "description": "Retrieves the list of ForwardingRule resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ForwardingRuleList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setTarget": { + "id": "compute.globalForwardingRules.setTarget", + "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", + "httpMethod": "POST", + "description": "Changes target url for forwarding rule.", + "parameters": { + "forwardingRule": { + "type": "string", + "description": "Name of the ForwardingRule resource in which target is to be set.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "forwardingRule" + ], + "request": { + "$ref": "TargetReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "globalOperations": { + "methods": { + "aggregatedList": { + "id": "compute.globalOperations.aggregatedList", + "path": "{project}/aggregated/operations", + "httpMethod": "GET", + "description": "Retrieves the list of all operations grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "OperationAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.globalOperations.delete", + "path": "{project}/global/operations/{operation}", + "httpMethod": "DELETE", + "description": "Deletes the specified operation resource.", + "parameters": { + "operation": { + "type": "string", + "description": "Name of the operation resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "operation" + ], + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.globalOperations.get", + "path": "{project}/global/operations/{operation}", + "httpMethod": "GET", + "description": "Retrieves the specified operation resource.", + "parameters": { + "operation": { + "type": "string", + "description": "Name of the operation resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "operation" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.globalOperations.list", + "path": "{project}/global/operations", + "httpMethod": "GET", + "description": "Retrieves the list of operation resources contained within the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "OperationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "httpHealthChecks": { + "methods": { + "delete": { + "id": "compute.httpHealthChecks.delete", + "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + "httpMethod": "DELETE", + "description": "Deletes the specified HttpHealthCheck resource.", + "parameters": { + "httpHealthCheck": { + "type": "string", + "description": "Name of the HttpHealthCheck resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "httpHealthCheck" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.httpHealthChecks.get", + "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + "httpMethod": "GET", + "description": "Returns the specified HttpHealthCheck resource.", + "parameters": { + "httpHealthCheck": { + "type": "string", + "description": "Name of the HttpHealthCheck resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "httpHealthCheck" + ], + "response": { + "$ref": "HttpHealthCheck" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.httpHealthChecks.insert", + "path": "{project}/global/httpHealthChecks", + "httpMethod": "POST", + "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "HttpHealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.httpHealthChecks.list", + "path": "{project}/global/httpHealthChecks", + "httpMethod": "GET", + "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "HttpHealthCheckList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.httpHealthChecks.patch", + "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + "httpMethod": "PATCH", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + "parameters": { + "httpHealthCheck": { + "type": "string", + "description": "Name of the HttpHealthCheck resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "httpHealthCheck" + ], + "request": { + "$ref": "HttpHealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "id": "compute.httpHealthChecks.update", + "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + "httpMethod": "PUT", + "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + "parameters": { + "httpHealthCheck": { + "type": "string", + "description": "Name of the HttpHealthCheck resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "httpHealthCheck" + ], + "request": { + "$ref": "HttpHealthCheck" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "images": { + "methods": { + "delete": { + "id": "compute.images.delete", + "path": "{project}/global/images/{image}", + "httpMethod": "DELETE", + "description": "Deletes the specified image resource.", + "parameters": { + "image": { + "type": "string", + "description": "Name of the image resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "image" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "deprecate": { + "id": "compute.images.deprecate", + "path": "{project}/global/images/{image}/deprecate", + "httpMethod": "POST", + "description": "Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.", + "parameters": { + "image": { + "type": "string", + "description": "Image name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "image" + ], + "request": { + "$ref": "DeprecationStatus" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.images.get", + "path": "{project}/global/images/{image}", + "httpMethod": "GET", + "description": "Returns the specified image resource.", + "parameters": { + "image": { + "type": "string", + "description": "Name of the image resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "image" + ], + "response": { + "$ref": "Image" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.images.insert", + "path": "{project}/global/images", + "httpMethod": "POST", + "description": "Creates an image resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Image" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + }, + "list": { + "id": "compute.images.list", + "path": "{project}/global/images", + "httpMethod": "GET", + "description": "Retrieves the list of image resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ImageList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "instanceTemplates": { + "methods": { + "delete": { + "id": "compute.instanceTemplates.delete", + "path": "{project}/global/instanceTemplates/{instanceTemplate}", + "httpMethod": "DELETE", + "description": "Deletes the specified instance template resource.", + "parameters": { + "instanceTemplate": { + "type": "string", + "description": "Name of the instance template resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "instanceTemplate" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.instanceTemplates.get", + "path": "{project}/global/instanceTemplates/{instanceTemplate}", + "httpMethod": "GET", + "description": "Returns the specified instance template resource.", + "parameters": { + "instanceTemplate": { + "type": "string", + "description": "Name of the instance template resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "instanceTemplate" + ], + "response": { + "$ref": "InstanceTemplate" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.instanceTemplates.insert", + "path": "{project}/global/instanceTemplates", + "httpMethod": "POST", + "description": "Creates an instance template resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "InstanceTemplate" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.instanceTemplates.list", + "path": "{project}/global/instanceTemplates", + "httpMethod": "GET", + "description": "Retrieves the list of instance template resources contained within the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InstanceTemplateList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "instances": { + "methods": { + "addAccessConfig": { + "id": "compute.instances.addAccessConfig", + "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", + "httpMethod": "POST", + "description": "Adds an access config to an instance's network interface.", + "parameters": { + "instance": { + "type": "string", + "description": "Instance name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "networkInterface": { + "type": "string", + "description": "Network interface name.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project name.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance", + "networkInterface" + ], + "request": { + "$ref": "AccessConfig" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "aggregatedList": { + "id": "compute.instances.aggregatedList", + "path": "{project}/aggregated/instances", + "httpMethod": "GET", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "InstanceAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "attachDisk": { + "id": "compute.instances.attachDisk", + "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", + "httpMethod": "POST", + "description": "Attaches a disk resource to an instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Instance name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project name.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "AttachedDisk" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "delete": { + "id": "compute.instances.delete", + "path": "{project}/zones/{zone}/instances/{instance}", + "httpMethod": "DELETE", + "description": "Deletes the specified instance resource.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "deleteAccessConfig": { + "id": "compute.instances.deleteAccessConfig", + "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", + "httpMethod": "POST", + "description": "Deletes an access config from an instance's network interface.", + "parameters": { + "accessConfig": { + "type": "string", + "description": "Access config name.", + "required": true, + "location": "query" + }, + "instance": { + "type": "string", + "description": "Instance name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "networkInterface": { + "type": "string", + "description": "Network interface name.", + "required": true, + "location": "query" + }, + "project": { + "type": "string", + "description": "Project name.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance", + "accessConfig", + "networkInterface" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "detachDisk": { + "id": "compute.instances.detachDisk", + "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", + "httpMethod": "POST", + "description": "Detaches a disk from an instance.", + "parameters": { + "deviceName": { + "type": "string", + "description": "Disk device name to detach.", + "required": true, + "pattern": "\\w[\\w.-]{0,254}", + "location": "query" + }, + "instance": { + "type": "string", + "description": "Instance name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project name.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance", + "deviceName" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.instances.get", + "path": "{project}/zones/{zone}/instances/{instance}", + "httpMethod": "GET", + "description": "Returns the specified instance resource.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "Instance" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getSerialPortOutput": { + "id": "compute.instances.getSerialPortOutput", + "path": "{project}/zones/{zone}/instances/{instance}/serialPort", + "httpMethod": "GET", + "description": "Returns the specified instance's serial port output.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "SerialPortOutput" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.instances.insert", + "path": "{project}/zones/{zone}/instances", + "httpMethod": "POST", + "description": "Creates an instance resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "request": { + "$ref": "Instance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.instances.list", + "path": "{project}/zones/{zone}/instances", + "httpMethod": "GET", + "description": "Retrieves the list of instance resources contained within the specified zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "InstanceList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "reset": { + "id": "compute.instances.reset", + "path": "{project}/zones/{zone}/instances/{instance}/reset", + "httpMethod": "POST", + "description": "Performs a hard reset on the instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "setDiskAutoDelete": { + "id": "compute.instances.setDiskAutoDelete", + "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", + "httpMethod": "POST", + "description": "Sets the auto-delete flag for a disk attached to an instance", + "parameters": { + "autoDelete": { + "type": "boolean", + "description": "Whether to auto-delete the disk when the instance is deleted.", + "required": true, + "location": "query" + }, + "deviceName": { + "type": "string", + "description": "Disk device name to modify.", + "required": true, + "pattern": "\\w[\\w.-]{0,254}", + "location": "query" + }, + "instance": { + "type": "string", + "description": "Instance name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project name.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance", + "autoDelete", + "deviceName" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "setMetadata": { + "id": "compute.instances.setMetadata", + "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", + "httpMethod": "POST", + "description": "Sets metadata for the specified instance to the data included in the request.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "Metadata" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "setScheduling": { + "id": "compute.instances.setScheduling", + "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", + "httpMethod": "POST", + "description": "Sets an instance's scheduling options.", + "parameters": { + "instance": { + "type": "string", + "description": "Instance name.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project name.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "Scheduling" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "setTags": { + "id": "compute.instances.setTags", + "path": "{project}/zones/{zone}/instances/{instance}/setTags", + "httpMethod": "POST", + "description": "Sets tags for the specified instance to the data included in the request.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "request": { + "$ref": "Tags" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "licenses": { + "methods": { + "get": { + "id": "compute.licenses.get", + "path": "{project}/global/licenses/{license}", + "httpMethod": "GET", + "description": "Returns the specified license resource.", + "parameters": { + "license": { + "type": "string", + "description": "Name of the license resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "license" + ], + "response": { + "$ref": "License" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "machineTypes": { + "methods": { + "aggregatedList": { + "id": "compute.machineTypes.aggregatedList", + "path": "{project}/aggregated/machineTypes", + "httpMethod": "GET", + "description": "Retrieves the list of machine type resources grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "MachineTypeAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "get": { + "id": "compute.machineTypes.get", + "path": "{project}/zones/{zone}/machineTypes/{machineType}", + "httpMethod": "GET", + "description": "Returns the specified machine type resource.", + "parameters": { + "machineType": { + "type": "string", + "description": "Name of the machine type resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "machineType" + ], + "response": { + "$ref": "MachineType" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.machineTypes.list", + "path": "{project}/zones/{zone}/machineTypes", + "httpMethod": "GET", + "description": "Retrieves the list of machine type resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "MachineTypeList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "networks": { + "methods": { + "delete": { + "id": "compute.networks.delete", + "path": "{project}/global/networks/{network}", + "httpMethod": "DELETE", + "description": "Deletes the specified network resource.", + "parameters": { + "network": { + "type": "string", + "description": "Name of the network resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "network" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.networks.get", + "path": "{project}/global/networks/{network}", + "httpMethod": "GET", + "description": "Returns the specified network resource.", + "parameters": { + "network": { + "type": "string", + "description": "Name of the network resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "network" + ], + "response": { + "$ref": "Network" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.networks.insert", + "path": "{project}/global/networks", + "httpMethod": "POST", + "description": "Creates a network resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Network" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.networks.list", + "path": "{project}/global/networks", + "httpMethod": "GET", + "description": "Retrieves the list of network resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "NetworkList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "projects": { + "methods": { + "get": { + "id": "compute.projects.get", + "path": "{project}", + "httpMethod": "GET", + "description": "Returns the specified project resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project resource to retrieve.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "Project" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setCommonInstanceMetadata": { + "id": "compute.projects.setCommonInstanceMetadata", + "path": "{project}/setCommonInstanceMetadata", + "httpMethod": "POST", + "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Metadata" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "setUsageExportBucket": { + "id": "compute.projects.setUsageExportBucket", + "path": "{project}/setUsageExportBucket", + "httpMethod": "POST", + "description": "Sets usage export location", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "UsageExportLocation" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/devstorage.full_control", + "https://www.googleapis.com/auth/devstorage.read_only", + "https://www.googleapis.com/auth/devstorage.read_write" + ] + } + } + }, + "regionOperations": { + "methods": { + "delete": { + "id": "compute.regionOperations.delete", + "path": "{project}/regions/{region}/operations/{operation}", + "httpMethod": "DELETE", + "description": "Deletes the specified region-specific operation resource.", + "parameters": { + "operation": { + "type": "string", + "description": "Name of the operation resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "operation" + ], + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.regionOperations.get", + "path": "{project}/regions/{region}/operations/{operation}", + "httpMethod": "GET", + "description": "Retrieves the specified region-specific operation resource.", + "parameters": { + "operation": { + "type": "string", + "description": "Name of the operation resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "operation" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.regionOperations.list", + "path": "{project}/regions/{region}/operations", + "httpMethod": "GET", + "description": "Retrieves the list of operation resources contained within the specified region.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "OperationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "regions": { + "methods": { + "get": { + "id": "compute.regions.get", + "path": "{project}/regions/{region}", + "httpMethod": "GET", + "description": "Returns the specified region resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "Region" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.regions.list", + "path": "{project}/regions", + "httpMethod": "GET", + "description": "Retrieves the list of region resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "RegionList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "routes": { + "methods": { + "delete": { + "id": "compute.routes.delete", + "path": "{project}/global/routes/{route}", + "httpMethod": "DELETE", + "description": "Deletes the specified route resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "route": { + "type": "string", + "description": "Name of the route resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "route" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.routes.get", + "path": "{project}/global/routes/{route}", + "httpMethod": "GET", + "description": "Returns the specified route resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "route": { + "type": "string", + "description": "Name of the route resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "route" + ], + "response": { + "$ref": "Route" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.routes.insert", + "path": "{project}/global/routes", + "httpMethod": "POST", + "description": "Creates a route resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "Route" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.routes.list", + "path": "{project}/global/routes", + "httpMethod": "GET", + "description": "Retrieves the list of route resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "RouteList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "snapshots": { + "methods": { + "delete": { + "id": "compute.snapshots.delete", + "path": "{project}/global/snapshots/{snapshot}", + "httpMethod": "DELETE", + "description": "Deletes the specified persistent disk snapshot resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "snapshot": { + "type": "string", + "description": "Name of the persistent disk snapshot resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "snapshot" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.snapshots.get", + "path": "{project}/global/snapshots/{snapshot}", + "httpMethod": "GET", + "description": "Returns the specified persistent disk snapshot resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "snapshot": { + "type": "string", + "description": "Name of the persistent disk snapshot resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "snapshot" + ], + "response": { + "$ref": "Snapshot" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.snapshots.list", + "path": "{project}/global/snapshots", + "httpMethod": "GET", + "description": "Retrieves the list of persistent disk snapshot resources contained within the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "SnapshotList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "targetHttpProxies": { + "methods": { + "delete": { + "id": "compute.targetHttpProxies.delete", + "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", + "httpMethod": "DELETE", + "description": "Deletes the specified TargetHttpProxy resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetHttpProxy": { + "type": "string", + "description": "Name of the TargetHttpProxy resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetHttpProxy" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.targetHttpProxies.get", + "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", + "httpMethod": "GET", + "description": "Returns the specified TargetHttpProxy resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetHttpProxy": { + "type": "string", + "description": "Name of the TargetHttpProxy resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetHttpProxy" + ], + "response": { + "$ref": "TargetHttpProxy" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.targetHttpProxies.insert", + "path": "{project}/global/targetHttpProxies", + "httpMethod": "POST", + "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "TargetHttpProxy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.targetHttpProxies.list", + "path": "{project}/global/targetHttpProxies", + "httpMethod": "GET", + "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "TargetHttpProxyList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "setUrlMap": { + "id": "compute.targetHttpProxies.setUrlMap", + "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", + "httpMethod": "POST", + "description": "Changes the URL map for TargetHttpProxy.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetHttpProxy": { + "type": "string", + "description": "Name of the TargetHttpProxy resource whose URL map is to be set.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "targetHttpProxy" + ], + "request": { + "$ref": "UrlMapReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "targetInstances": { + "methods": { + "aggregatedList": { + "id": "compute.targetInstances.aggregatedList", + "path": "{project}/aggregated/targetInstances", + "httpMethod": "GET", + "description": "Retrieves the list of target instances grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "TargetInstanceAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.targetInstances.delete", + "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", + "httpMethod": "DELETE", + "description": "Deletes the specified TargetInstance resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetInstance": { + "type": "string", + "description": "Name of the TargetInstance resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "targetInstance" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.targetInstances.get", + "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", + "httpMethod": "GET", + "description": "Returns the specified TargetInstance resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "targetInstance": { + "type": "string", + "description": "Name of the TargetInstance resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "targetInstance" + ], + "response": { + "$ref": "TargetInstance" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.targetInstances.insert", + "path": "{project}/zones/{zone}/targetInstances", + "httpMethod": "POST", + "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "request": { + "$ref": "TargetInstance" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.targetInstances.list", + "path": "{project}/zones/{zone}/targetInstances", + "httpMethod": "GET", + "description": "Retrieves the list of TargetInstance resources available to the specified project and zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "TargetInstanceList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "targetPools": { + "methods": { + "addHealthCheck": { + "id": "compute.targetPools.addHealthCheck", + "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", + "httpMethod": "POST", + "description": "Adds health check URL to targetPool.", + "parameters": { + "project": { + "type": "string", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to which health_check_url is to be added.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "request": { + "$ref": "TargetPoolsAddHealthCheckRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "addInstance": { + "id": "compute.targetPools.addInstance", + "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", + "httpMethod": "POST", + "description": "Adds instance url to targetPool.", + "parameters": { + "project": { + "type": "string", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to which instance_url is to be added.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "request": { + "$ref": "TargetPoolsAddInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "aggregatedList": { + "id": "compute.targetPools.aggregatedList", + "path": "{project}/aggregated/targetPools", + "httpMethod": "GET", + "description": "Retrieves the list of target pools grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "TargetPoolAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.targetPools.delete", + "path": "{project}/regions/{region}/targetPools/{targetPool}", + "httpMethod": "DELETE", + "description": "Deletes the specified TargetPool resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.targetPools.get", + "path": "{project}/regions/{region}/targetPools/{targetPool}", + "httpMethod": "GET", + "description": "Returns the specified TargetPool resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "response": { + "$ref": "TargetPool" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "getHealth": { + "id": "compute.targetPools.getHealth", + "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", + "httpMethod": "POST", + "description": "Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool.", + "parameters": { + "project": { + "type": "string", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to which the queried instance belongs.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "request": { + "$ref": "InstanceReference" + }, + "response": { + "$ref": "TargetPoolInstanceHealth" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.targetPools.insert", + "path": "{project}/regions/{region}/targetPools", + "httpMethod": "POST", + "description": "Creates a TargetPool resource in the specified project and region using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "TargetPool" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.targetPools.list", + "path": "{project}/regions/{region}/targetPools", + "httpMethod": "GET", + "description": "Retrieves the list of TargetPool resources available to the specified project and region.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "TargetPoolList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "removeHealthCheck": { + "id": "compute.targetPools.removeHealthCheck", + "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", + "httpMethod": "POST", + "description": "Removes health check URL from targetPool.", + "parameters": { + "project": { + "type": "string", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to which health_check_url is to be removed.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "request": { + "$ref": "TargetPoolsRemoveHealthCheckRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "removeInstance": { + "id": "compute.targetPools.removeInstance", + "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", + "httpMethod": "POST", + "description": "Removes instance URL from targetPool.", + "parameters": { + "project": { + "type": "string", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource to which instance_url is to be removed.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "request": { + "$ref": "TargetPoolsRemoveInstanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "setBackup": { + "id": "compute.targetPools.setBackup", + "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", + "httpMethod": "POST", + "description": "Changes backup pool configurations.", + "parameters": { + "failoverRatio": { + "type": "number", + "description": "New failoverRatio value for the containing target pool.", + "format": "float", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "Name of the region scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetPool": { + "type": "string", + "description": "Name of the TargetPool resource for which the backup is to be set.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetPool" + ], + "request": { + "$ref": "TargetReference" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "urlMaps": { + "methods": { + "delete": { + "id": "compute.urlMaps.delete", + "path": "{project}/global/urlMaps/{urlMap}", + "httpMethod": "DELETE", + "description": "Deletes the specified UrlMap resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "urlMap": { + "type": "string", + "description": "Name of the UrlMap resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "urlMap" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.urlMaps.get", + "path": "{project}/global/urlMaps/{urlMap}", + "httpMethod": "GET", + "description": "Returns the specified UrlMap resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "urlMap": { + "type": "string", + "description": "Name of the UrlMap resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "urlMap" + ], + "response": { + "$ref": "UrlMap" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.urlMaps.insert", + "path": "{project}/global/urlMaps", + "httpMethod": "POST", + "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "UrlMap" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.urlMaps.list", + "path": "{project}/global/urlMaps", + "httpMethod": "GET", + "description": "Retrieves the list of UrlMap resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "UrlMapList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "patch": { + "id": "compute.urlMaps.patch", + "path": "{project}/global/urlMaps/{urlMap}", + "httpMethod": "PATCH", + "description": "Update the entire content of the UrlMap resource. This method supports patch semantics.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "urlMap": { + "type": "string", + "description": "Name of the UrlMap resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "urlMap" + ], + "request": { + "$ref": "UrlMap" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "update": { + "id": "compute.urlMaps.update", + "path": "{project}/global/urlMaps/{urlMap}", + "httpMethod": "PUT", + "description": "Update the entire content of the UrlMap resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "urlMap": { + "type": "string", + "description": "Name of the UrlMap resource to update.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "urlMap" + ], + "request": { + "$ref": "UrlMap" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "validate": { + "id": "compute.urlMaps.validate", + "path": "{project}/global/urlMaps/{urlMap}/validate", + "httpMethod": "POST", + "description": "Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "urlMap": { + "type": "string", + "description": "Name of the UrlMap resource to be validated as.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "urlMap" + ], + "request": { + "$ref": "UrlMapsValidateRequest" + }, + "response": { + "$ref": "UrlMapsValidateResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + } + } + }, + "zoneOperations": { + "methods": { + "delete": { + "id": "compute.zoneOperations.delete", + "path": "{project}/zones/{zone}/operations/{operation}", + "httpMethod": "DELETE", + "description": "Deletes the specified zone-specific operation resource.", + "parameters": { + "operation": { + "type": "string", + "description": "Name of the operation resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "operation" + ], + "scopes": [ + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.zoneOperations.get", + "path": "{project}/zones/{zone}/operations/{operation}", + "httpMethod": "GET", + "description": "Retrieves the specified zone-specific operation resource.", + "parameters": { + "operation": { + "type": "string", + "description": "Name of the operation resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "operation" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.zoneOperations.list", + "path": "{project}/zones/{zone}/operations", + "httpMethod": "GET", + "description": "Retrieves the list of operation resources contained within the specified zone.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone scoping this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "OperationList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, + "zones": { + "methods": { + "get": { + "id": "compute.zones.get", + "path": "{project}/zones/{zone}", + "httpMethod": "GET", + "description": "Returns the specified zone resource.", + "parameters": { + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "Name of the zone resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone" + ], + "response": { + "$ref": "Zone" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "id": "compute.zones.list", + "path": "{project}/zones", + "httpMethod": "GET", + "description": "Retrieves the list of zone resources available to the specified project.", + "parameters": { + "filter": { + "type": "string", + "description": "Optional. Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Name of the project scoping 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-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "ZoneList" + }, + "scopes": [ + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + } + } +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-gen.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-gen.go new file mode 100644 index 000000000000..7d193b56b844 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/compute/v1/v1/compute-gen.go @@ -0,0 +1,16952 @@ +// Package compute provides access to the Compute Engine API. +// +// See https://developers.google.com/compute/docs/reference/latest/ +// +// Usage example: +// +// import "code.google.com/p/google-api-go-client/compute/v1" +// ... +// computeService, err := compute.New(oauthHttpClient) +package compute + +import ( + "bytes" + "code.google.com/p/google-api-go-client/googleapi" + "encoding/json" + "errors" + "fmt" + "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 _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace + +const apiId = "compute:v1" +const apiName = "compute" +const apiVersion = "v1" +const basePath = "https://www.googleapis.com/compute/v1/projects/" + +// OAuth2 scopes used by this API. +const ( + // View and manage your Google Compute Engine resources + ComputeScope = "https://www.googleapis.com/auth/compute" + + // View your Google Compute Engine resources + ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" + + // Manage your data and permissions in Google Cloud Storage + DevstorageFull_controlScope = "https://www.googleapis.com/auth/devstorage.full_control" + + // View your data in Google Cloud Storage + DevstorageRead_onlyScope = "https://www.googleapis.com/auth/devstorage.read_only" + + // Manage your data in Google Cloud Storage + DevstorageRead_writeScope = "https://www.googleapis.com/auth/devstorage.read_write" +) + +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Addresses = NewAddressesService(s) + s.BackendServices = NewBackendServicesService(s) + s.DiskTypes = NewDiskTypesService(s) + s.Disks = NewDisksService(s) + s.Firewalls = NewFirewallsService(s) + s.ForwardingRules = NewForwardingRulesService(s) + s.GlobalAddresses = NewGlobalAddressesService(s) + s.GlobalForwardingRules = NewGlobalForwardingRulesService(s) + s.GlobalOperations = NewGlobalOperationsService(s) + s.HttpHealthChecks = NewHttpHealthChecksService(s) + s.Images = NewImagesService(s) + s.InstanceTemplates = NewInstanceTemplatesService(s) + s.Instances = NewInstancesService(s) + s.Licenses = NewLicensesService(s) + s.MachineTypes = NewMachineTypesService(s) + s.Networks = NewNetworksService(s) + s.Projects = NewProjectsService(s) + s.RegionOperations = NewRegionOperationsService(s) + s.Regions = NewRegionsService(s) + s.Routes = NewRoutesService(s) + s.Snapshots = NewSnapshotsService(s) + s.TargetHttpProxies = NewTargetHttpProxiesService(s) + s.TargetInstances = NewTargetInstancesService(s) + s.TargetPools = NewTargetPoolsService(s) + s.UrlMaps = NewUrlMapsService(s) + s.ZoneOperations = NewZoneOperationsService(s) + s.Zones = NewZonesService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + + Addresses *AddressesService + + BackendServices *BackendServicesService + + DiskTypes *DiskTypesService + + Disks *DisksService + + Firewalls *FirewallsService + + ForwardingRules *ForwardingRulesService + + GlobalAddresses *GlobalAddressesService + + GlobalForwardingRules *GlobalForwardingRulesService + + GlobalOperations *GlobalOperationsService + + HttpHealthChecks *HttpHealthChecksService + + Images *ImagesService + + InstanceTemplates *InstanceTemplatesService + + Instances *InstancesService + + Licenses *LicensesService + + MachineTypes *MachineTypesService + + Networks *NetworksService + + Projects *ProjectsService + + RegionOperations *RegionOperationsService + + Regions *RegionsService + + Routes *RoutesService + + Snapshots *SnapshotsService + + TargetHttpProxies *TargetHttpProxiesService + + TargetInstances *TargetInstancesService + + TargetPools *TargetPoolsService + + UrlMaps *UrlMapsService + + ZoneOperations *ZoneOperationsService + + Zones *ZonesService +} + +func NewAddressesService(s *Service) *AddressesService { + rs := &AddressesService{s: s} + return rs +} + +type AddressesService struct { + s *Service +} + +func NewBackendServicesService(s *Service) *BackendServicesService { + rs := &BackendServicesService{s: s} + return rs +} + +type BackendServicesService struct { + s *Service +} + +func NewDiskTypesService(s *Service) *DiskTypesService { + rs := &DiskTypesService{s: s} + return rs +} + +type DiskTypesService struct { + s *Service +} + +func NewDisksService(s *Service) *DisksService { + rs := &DisksService{s: s} + return rs +} + +type DisksService struct { + s *Service +} + +func NewFirewallsService(s *Service) *FirewallsService { + rs := &FirewallsService{s: s} + return rs +} + +type FirewallsService struct { + s *Service +} + +func NewForwardingRulesService(s *Service) *ForwardingRulesService { + rs := &ForwardingRulesService{s: s} + return rs +} + +type ForwardingRulesService struct { + s *Service +} + +func NewGlobalAddressesService(s *Service) *GlobalAddressesService { + rs := &GlobalAddressesService{s: s} + return rs +} + +type GlobalAddressesService struct { + s *Service +} + +func NewGlobalForwardingRulesService(s *Service) *GlobalForwardingRulesService { + rs := &GlobalForwardingRulesService{s: s} + return rs +} + +type GlobalForwardingRulesService struct { + s *Service +} + +func NewGlobalOperationsService(s *Service) *GlobalOperationsService { + rs := &GlobalOperationsService{s: s} + return rs +} + +type GlobalOperationsService struct { + s *Service +} + +func NewHttpHealthChecksService(s *Service) *HttpHealthChecksService { + rs := &HttpHealthChecksService{s: s} + return rs +} + +type HttpHealthChecksService struct { + s *Service +} + +func NewImagesService(s *Service) *ImagesService { + rs := &ImagesService{s: s} + return rs +} + +type ImagesService struct { + s *Service +} + +func NewInstanceTemplatesService(s *Service) *InstanceTemplatesService { + rs := &InstanceTemplatesService{s: s} + return rs +} + +type InstanceTemplatesService struct { + s *Service +} + +func NewInstancesService(s *Service) *InstancesService { + rs := &InstancesService{s: s} + return rs +} + +type InstancesService struct { + s *Service +} + +func NewLicensesService(s *Service) *LicensesService { + rs := &LicensesService{s: s} + return rs +} + +type LicensesService struct { + s *Service +} + +func NewMachineTypesService(s *Service) *MachineTypesService { + rs := &MachineTypesService{s: s} + return rs +} + +type MachineTypesService struct { + s *Service +} + +func NewNetworksService(s *Service) *NetworksService { + rs := &NetworksService{s: s} + return rs +} + +type NetworksService struct { + s *Service +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + return rs +} + +type ProjectsService struct { + s *Service +} + +func NewRegionOperationsService(s *Service) *RegionOperationsService { + rs := &RegionOperationsService{s: s} + return rs +} + +type RegionOperationsService struct { + s *Service +} + +func NewRegionsService(s *Service) *RegionsService { + rs := &RegionsService{s: s} + return rs +} + +type RegionsService struct { + s *Service +} + +func NewRoutesService(s *Service) *RoutesService { + rs := &RoutesService{s: s} + return rs +} + +type RoutesService struct { + s *Service +} + +func NewSnapshotsService(s *Service) *SnapshotsService { + rs := &SnapshotsService{s: s} + return rs +} + +type SnapshotsService struct { + s *Service +} + +func NewTargetHttpProxiesService(s *Service) *TargetHttpProxiesService { + rs := &TargetHttpProxiesService{s: s} + return rs +} + +type TargetHttpProxiesService struct { + s *Service +} + +func NewTargetInstancesService(s *Service) *TargetInstancesService { + rs := &TargetInstancesService{s: s} + return rs +} + +type TargetInstancesService struct { + s *Service +} + +func NewTargetPoolsService(s *Service) *TargetPoolsService { + rs := &TargetPoolsService{s: s} + return rs +} + +type TargetPoolsService struct { + s *Service +} + +func NewUrlMapsService(s *Service) *UrlMapsService { + rs := &UrlMapsService{s: s} + return rs +} + +type UrlMapsService struct { + s *Service +} + +func NewZoneOperationsService(s *Service) *ZoneOperationsService { + rs := &ZoneOperationsService{s: s} + return rs +} + +type ZoneOperationsService struct { + s *Service +} + +func NewZonesService(s *Service) *ZonesService { + rs := &ZonesService{s: s} + return rs +} + +type ZonesService struct { + s *Service +} + +type AccessConfig struct { + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of this access configuration. + Name string `json:"name,omitempty"` + + // NatIP: An external IP address associated with this instance. Specify + // an unused static IP address available to the project. If not + // specified, the external IP will be drawn from a shared ephemeral + // pool. + NatIP string `json:"natIP,omitempty"` + + // Type: Type of configuration. Must be set to "ONE_TO_ONE_NAT". This + // configures port-for-port NAT to the internet. + Type string `json:"type,omitempty"` +} + +type Address struct { + // Address: The IP address represented by this resource. + Address string `json:"address,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // Region: URL of the region where the regional address resides (output + // only). This field is not applicable to global addresses. + Region string `json:"region,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Status: The status of the address (output only). + Status string `json:"status,omitempty"` + + // Users: The resources that are using this address resource. + Users []string `json:"users,omitempty"` +} + +type AddressAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped address lists. + Items map[string]AddressesScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type AddressList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The address resources. + Items []*Address `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type AddressesScopedList struct { + // Addresses: List of addresses contained in this scope. + Addresses []*Address `json:"addresses,omitempty"` + + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *AddressesScopedListWarning `json:"warning,omitempty"` +} + +type AddressesScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*AddressesScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type AddressesScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type AttachedDisk struct { + // AutoDelete: Whether the disk will be auto-deleted when the instance + // is deleted (but not when the disk is detached from the instance). + AutoDelete bool `json:"autoDelete,omitempty"` + + // Boot: Indicates that this is a boot disk. VM will use the first + // partition of the disk for its root filesystem. + Boot bool `json:"boot,omitempty"` + + // DeviceName: Persistent disk only; must be unique within the instance + // when specified. This represents a unique device name that is + // reflected into the /dev/ tree of a Linux operating system running + // within the instance. If not specified, a default will be chosen by + // the system. + DeviceName string `json:"deviceName,omitempty"` + + // Index: A zero-based index to assign to this disk, where 0 is reserved + // for the boot disk. If not specified, the server will choose an + // appropriate value (output only). + Index int64 `json:"index,omitempty"` + + // InitializeParams: Initialization parameters. + InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` + + Interface string `json:"interface,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Licenses: Public visible licenses. + Licenses []string `json:"licenses,omitempty"` + + // Mode: The mode in which to attach this disk, either "READ_WRITE" or + // "READ_ONLY". + Mode string `json:"mode,omitempty"` + + // Source: Persistent disk only; the URL of the persistent disk + // resource. + Source string `json:"source,omitempty"` + + // Type: Type of the disk, either "SCRATCH" or "PERSISTENT". Note that + // persistent disks must be created before you can specify them here. + Type string `json:"type,omitempty"` +} + +type AttachedDiskInitializeParams struct { + // DiskName: Name of the disk (when not provided defaults to the name of + // the instance). + DiskName string `json:"diskName,omitempty"` + + // DiskSizeGb: Size of the disk in base-2 GB. + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // DiskType: URL of the disk type resource describing which disk type to + // use to create the disk; provided by the client when the disk is + // created. + DiskType string `json:"diskType,omitempty"` + + // SourceImage: The source image used to create this disk. + SourceImage string `json:"sourceImage,omitempty"` +} + +type Backend struct { + // BalancingMode: The balancing mode of this backend, default is + // UTILIZATION. + BalancingMode string `json:"balancingMode,omitempty"` + + // CapacityScaler: The multiplier (a value between 0 and 1e6) of the max + // capacity (CPU or RPS, depending on 'balancingMode') the group should + // serve up to. 0 means the group is totally drained. Default value is + // 1. Valid range is [0, 1e6]. + CapacityScaler float64 `json:"capacityScaler,omitempty"` + + // Description: An optional textual description of the resource, which + // is provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Group: URL of a zonal Cloud Resource View resource. This resource + // view defines the list of instances that serve traffic. Member virtual + // machine instances from each resource view must live in the same zone + // as the resource view itself. No two backends in a backend service are + // allowed to use same Resource View resource. + Group string `json:"group,omitempty"` + + // MaxRate: The max RPS of the group. Can be used with either balancing + // mode, but required if RATE mode. For RATE mode, either maxRate or + // maxRatePerInstance must be set. + MaxRate int64 `json:"maxRate,omitempty"` + + // MaxRatePerInstance: The max RPS that a single backed instance can + // handle. This is used to calculate the capacity of the group. Can be + // used in either balancing mode. For RATE mode, either maxRate or + // maxRatePerInstance must be set. + MaxRatePerInstance float64 `json:"maxRatePerInstance,omitempty"` + + // MaxUtilization: Used when 'balancingMode' is UTILIZATION. This ratio + // defines the CPU utilization target for the group. The default is 0.8. + // Valid range is [0, 1]. + MaxUtilization float64 `json:"maxUtilization,omitempty"` +} + +type BackendService struct { + // Backends: The list of backends that serve this BackendService. + Backends []*Backend `json:"backends,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,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 + // fingerprint must be provided in order to update the BackendService. + Fingerprint string `json:"fingerprint,omitempty"` + + // HealthChecks: The list of URLs to the HttpHealthCheck resource for + // health checking this BackendService. Currently at most one health + // check can be specified, and a health check is required. + HealthChecks []string `json:"healthChecks,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // Port: Deprecated in favor of port_name. The TCP port to connect on + // the backend. The default value is 80. + Port int64 `json:"port,omitempty"` + + // PortName: Name of backend port. The same name should appear in the + // resource views referenced by this service. Required. + PortName string `json:"portName,omitempty"` + + Protocol string `json:"protocol,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // TimeoutSec: How many seconds to wait for the backend before + // considering it a failed request. Default is 30 seconds. + TimeoutSec int64 `json:"timeoutSec,omitempty"` +} + +type BackendServiceGroupHealth struct { + HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` +} + +type BackendServiceList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The BackendService resources. + Items []*BackendService `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type DeprecationStatus struct { + // Deleted: An optional RFC3339 timestamp on or after which the + // deprecation state of this resource will be changed to DELETED. + Deleted string `json:"deleted,omitempty"` + + // Deprecated: An optional RFC3339 timestamp on or after which the + // deprecation state of this resource will be changed to DEPRECATED. + Deprecated string `json:"deprecated,omitempty"` + + // Obsolete: An optional RFC3339 timestamp on or after which the + // deprecation state of this resource will be changed to OBSOLETE. + Obsolete string `json:"obsolete,omitempty"` + + // Replacement: A URL of the suggested replacement for the deprecated + // resource. The deprecated resource and its replacement must be + // resources of the same kind. + Replacement string `json:"replacement,omitempty"` + + // State: The deprecation state. Can be "DEPRECATED", "OBSOLETE", or + // "DELETED". Operations which create a new resource using a + // "DEPRECATED" resource will return successfully, but with a warning + // indicating the deprecated resource and recommending its replacement. + // New uses of "OBSOLETE" or "DELETED" resources will result in an + // error. + State string `json:"state,omitempty"` +} + +type Disk struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Licenses: Public visible licenses. + Licenses []string `json:"licenses,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. + Name string `json:"name,omitempty"` + + // Options: Internal use only. + Options string `json:"options,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // SizeGb: Size of the persistent disk, specified in GB. This parameter + // is optional when creating a disk from a disk image or a snapshot, + // otherwise it is required. + SizeGb int64 `json:"sizeGb,omitempty,string"` + + // SourceImage: The source image used to create this disk. + SourceImage string `json:"sourceImage,omitempty"` + + // SourceImageId: The 'id' value of the image used to create this disk. + // This value may be used to determine whether the disk was created from + // the current or a previous instance of a given image. + SourceImageId string `json:"sourceImageId,omitempty"` + + // SourceSnapshot: The source snapshot used to create this disk. + SourceSnapshot string `json:"sourceSnapshot,omitempty"` + + // SourceSnapshotId: The 'id' value of the snapshot used to create this + // disk. This value may be used to determine whether the disk was + // created from the current or a previous instance of a given disk + // snapshot. + SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` + + // Status: The status of disk creation (output only). + Status string `json:"status,omitempty"` + + // Type: URL of the disk type resource describing which disk type to use + // to create the disk; provided by the client when the disk is created. + Type string `json:"type,omitempty"` + + // Zone: URL of the zone where the disk resides (output only). + Zone string `json:"zone,omitempty"` +} + +type DiskAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped disk lists. + Items map[string]DisksScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type DiskList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The persistent disk resources. + Items []*Disk `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type DiskType struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // DefaultDiskSizeGb: Server defined default disk size in gb (output + // only). + DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` + + // Deprecated: The deprecation status associated with this disk type. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: An optional textual description of the resource. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. + Name string `json:"name,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // ValidDiskSize: An optional textual descroption of the valid disk + // size, e.g., "10GB-10TB". + ValidDiskSize string `json:"validDiskSize,omitempty"` + + // Zone: Url of the zone where the disk type resides (output only). + Zone string `json:"zone,omitempty"` +} + +type DiskTypeAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped disk type lists. + Items map[string]DiskTypesScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type DiskTypeList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The disk type resources. + Items []*DiskType `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type DiskTypesScopedList struct { + // DiskTypes: List of disk types contained in this scope. + DiskTypes []*DiskType `json:"diskTypes,omitempty"` + + // Warning: Informational warning which replaces the list of disk types + // when the list is empty. + Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` +} + +type DiskTypesScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type DiskTypesScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type DisksScopedList struct { + // Disks: List of disks contained in this scope. + Disks []*Disk `json:"disks,omitempty"` + + // Warning: Informational warning which replaces the list of disks when + // the list is empty. + Warning *DisksScopedListWarning `json:"warning,omitempty"` +} + +type DisksScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*DisksScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type DisksScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type Firewall struct { + // Allowed: The list of rules specified by this firewall. Each rule + // specifies a protocol and port-range tuple that describes a permitted + // connection. + Allowed []*FirewallAllowed `json:"allowed,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // Network: URL of the network to which this firewall is applied; + // provided by the client when the firewall is created. + Network string `json:"network,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // SourceRanges: A list of IP address blocks expressed in CIDR format + // which this rule applies to. One or both of sourceRanges and + // sourceTags may be set; an inbound connection is allowed if either the + // range or the tag of the source matches. + SourceRanges []string `json:"sourceRanges,omitempty"` + + // SourceTags: A list of instance tags which this rule applies to. One + // or both of sourceRanges and sourceTags may be set; an inbound + // connection is allowed if either the range or the tag of the source + // matches. + SourceTags []string `json:"sourceTags,omitempty"` + + // TargetTags: A list of instance tags indicating sets of instances + // located on network which may make network connections as specified in + // allowed. If no targetTags are specified, the firewall rule applies to + // all instances on the specified network. + TargetTags []string `json:"targetTags,omitempty"` +} + +type FirewallAllowed struct { + // IPProtocol: Required; this is the IP protocol that is allowed for + // this rule. This can either be one of the following well known + // protocol strings ["tcp", "udp", "icmp", "esp", "ah", "sctp"], or the + // IP protocol number. + IPProtocol string `json:"IPProtocol,omitempty"` + + // Ports: An optional list of ports which are allowed. It is an error to + // specify this for any protocol that isn't UDP or TCP. Each entry must + // be either an integer or a range. If not specified, connections + // through any port are allowed. + // + // Example inputs include: ["22"], + // ["80","443"] and ["12345-12349"]. + Ports []string `json:"ports,omitempty"` +} + +type FirewallList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The firewall resources. + Items []*Firewall `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type ForwardingRule struct { + // IPAddress: Value of the reserved IP address that this forwarding rule + // is serving on behalf of. For global forwarding rules, the address + // must be a global IP; for regional forwarding rules, the address must + // live in the same region as the forwarding rule. If left empty + // (default value), an ephemeral IP from the same scope (global or + // regional) will be assigned. + IPAddress string `json:"IPAddress,omitempty"` + + // IPProtocol: The IP protocol to which this rule applies, valid options + // are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'. + IPProtocol string `json:"IPProtocol,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // PortRange: Applicable only when 'IPProtocol' is 'TCP', 'UDP' or + // 'SCTP', only packets addressed to ports in the specified range will + // be forwarded to 'target'. If 'portRange' is left empty (default + // value), all ports are forwarded. Forwarding rules with the same + // [IPAddress, IPProtocol] pair must have disjoint port ranges. + PortRange string `json:"portRange,omitempty"` + + // Region: URL of the region where the regional forwarding rule resides + // (output only). This field is not applicable to global forwarding + // rules. + Region string `json:"region,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Target: The URL of the target resource to receive the matched + // traffic. For regional forwarding rules, this target must live in the + // same region as the forwarding rule. For global forwarding rules, this + // target must be a global TargetHttpProxy resource. + Target string `json:"target,omitempty"` +} + +type ForwardingRuleAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped forwarding rule lists. + Items map[string]ForwardingRulesScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type ForwardingRuleList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The ForwardingRule resources. + Items []*ForwardingRule `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type ForwardingRulesScopedList struct { + // ForwardingRules: List of forwarding rules contained in this scope. + ForwardingRules []*ForwardingRule `json:"forwardingRules,omitempty"` + + // Warning: Informational warning which replaces the list of forwarding + // rules when the list is empty. + Warning *ForwardingRulesScopedListWarning `json:"warning,omitempty"` +} + +type ForwardingRulesScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type ForwardingRulesScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type HealthCheckReference struct { + HealthCheck string `json:"healthCheck,omitempty"` +} + +type HealthStatus struct { + // HealthState: Health state of the instance. + HealthState string `json:"healthState,omitempty"` + + // Instance: URL of the instance resource. + Instance string `json:"instance,omitempty"` + + // IpAddress: The IP address represented by this resource. + IpAddress string `json:"ipAddress,omitempty"` + + // Port: The port on the instance. + Port int64 `json:"port,omitempty"` +} + +type HostRule struct { + Description string `json:"description,omitempty"` + + // Hosts: The list of host patterns to match. They must be valid + // hostnames except that they may start with *. or *-. The * acts like a + // glob and will match any string of atoms (separated by .s and -s) to + // the left. + Hosts []string `json:"hosts,omitempty"` + + // PathMatcher: The name of the PathMatcher to match the path portion of + // the URL, if the this HostRule matches the URL's host portion. + PathMatcher string `json:"pathMatcher,omitempty"` +} + +type HttpHealthCheck struct { + // CheckIntervalSec: How often (in seconds) to send a health check. The + // default value is 5 seconds. + CheckIntervalSec int64 `json:"checkIntervalSec,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // HealthyThreshold: A so-far unhealthy VM will be marked healthy after + // this many consecutive successes. The default value is 2. + HealthyThreshold int64 `json:"healthyThreshold,omitempty"` + + // Host: The value of the host header in the HTTP health check request. + // If left empty (default value), the public IP on behalf of which this + // health check is performed will be used. + Host string `json:"host,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // Port: The TCP port number for the HTTP health check request. The + // default value is 80. + Port int64 `json:"port,omitempty"` + + // RequestPath: The request path of the HTTP health check request. The + // default value is "/". + RequestPath string `json:"requestPath,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // TimeoutSec: How long (in seconds) to wait before claiming failure. + // The default value is 5 seconds. + TimeoutSec int64 `json:"timeoutSec,omitempty"` + + // UnhealthyThreshold: A so-far healthy VM will be marked unhealthy + // after this many consecutive failures. The default value is 2. + UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty"` +} + +type HttpHealthCheckList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The HttpHealthCheck resources. + Items []*HttpHealthCheck `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type Image struct { + // ArchiveSizeBytes: Size of the image tar.gz archive stored in Google + // Cloud Storage (in bytes). + ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Deprecated: The deprecation status associated with this image. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: Textual description of the resource; provided by the + // client when the resource is created. + Description string `json:"description,omitempty"` + + // DiskSizeGb: Size of the image when restored onto a disk (in GiB). + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Licenses: Public visible licenses. + Licenses []string `json:"licenses,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. + Name string `json:"name,omitempty"` + + // RawDisk: The raw disk image parameters. + RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // SourceDisk: The source disk used to create this image. + SourceDisk string `json:"sourceDisk,omitempty"` + + // SourceDiskId: The 'id' value of the disk used to create this image. + // This value may be used to determine whether the image was taken from + // the current or a previous instance of a given disk name. + SourceDiskId string `json:"sourceDiskId,omitempty"` + + // SourceType: Must be "RAW"; provided by the client when the disk image + // is created. + SourceType string `json:"sourceType,omitempty"` + + // Status: Status of the image (output only). It will be one of the + // following READY - after image has been successfully created and is + // ready for use FAILED - if creating the image fails for some reason + // PENDING - the image creation is in progress An image can be used to + // create other resources suck as instances only after the image has + // been successfully created and the status is set to READY. + Status string `json:"status,omitempty"` +} + +type ImageRawDisk struct { + // ContainerType: The format used to encode and transmit the block + // device. Should be TAR. This is just a container and transmission + // format and not a runtime format. Provided by the client when the disk + // image is created. + ContainerType string `json:"containerType,omitempty"` + + // Sha1Checksum: An optional SHA1 checksum of the disk image before + // unpackaging; provided by the client when the disk image is created. + Sha1Checksum string `json:"sha1Checksum,omitempty"` + + // Source: The full Google Cloud Storage URL where the disk image is + // stored; provided by the client when the disk image is created. + Source string `json:"source,omitempty"` +} + +type ImageList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The disk image resources. + Items []*Image `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type Instance struct { + // CanIpForward: Allows this instance to send packets with source IP + // addresses other than its own and receive packets with destination IP + // addresses other than its own. If this instance will be used as an IP + // gateway or it will be set as the next-hop in a Route resource, say + // true. If unsure, leave this set to false. + CanIpForward bool `json:"canIpForward,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Disks: Array of disks associated with this instance. Persistent disks + // must be created before you can assign them. + Disks []*AttachedDisk `json:"disks,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // MachineType: URL of the machine type resource describing which + // machine type to use to host the instance; provided by the client when + // the instance is created. + MachineType string `json:"machineType,omitempty"` + + // Metadata: Metadata key/value pairs assigned to this instance. + // Consists of custom metadata or predefined keys; see Instance + // documentation for more information. + Metadata *Metadata `json:"metadata,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. + Name string `json:"name,omitempty"` + + // NetworkInterfaces: 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. Currently, + // ONE_TO_ONE_NAT is the only access config supported. If there are no + // accessConfigs specified, then this instance will have no external + // internet access. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + // Scheduling: Scheduling options for this instance. + Scheduling *Scheduling `json:"scheduling,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // ServiceAccounts: A list of service accounts each with specified + // scopes, for which access tokens are to be made available to the + // instance through metadata queries. + ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + + // Status: Instance status. One of the following values: "PROVISIONING", + // "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output + // only). + Status string `json:"status,omitempty"` + + // StatusMessage: An optional, human-readable explanation of the status + // (output only). + StatusMessage string `json:"statusMessage,omitempty"` + + // Tags: A list of tags to be applied to this instance. Used to identify + // valid sources or targets for network firewalls. Provided by the + // client on instance creation. The tags can be later modified by the + // setTags method. Each tag within the list must comply with RFC1035. + Tags *Tags `json:"tags,omitempty"` + + // Zone: URL of the zone where the instance resides (output only). + Zone string `json:"zone,omitempty"` +} + +type InstanceAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped instance lists. + Items map[string]InstancesScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type InstanceList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A list of instance resources. + Items []*Instance `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type InstanceProperties struct { + // CanIpForward: Allows instances created based on this template to send + // packets with source IP addresses other than their own and receive + // packets with destination IP addresses other than their own. If these + // instances will be used as an IP gateway or it will be set as the + // next-hop in a Route resource, say true. If unsure, leave this set to + // false. + CanIpForward bool `json:"canIpForward,omitempty"` + + // Description: An optional textual description for the instances + // created based on the instance template resource; provided by the + // client when the template is created. + Description string `json:"description,omitempty"` + + // Disks: Array of disks associated with instance created based on this + // template. + Disks []*AttachedDisk `json:"disks,omitempty"` + + // MachineType: Name of the machine type resource describing which + // machine type to use to host the instances created based on this + // template; provided by the client when the instance template is + // created. + MachineType string `json:"machineType,omitempty"` + + // Metadata: Metadata key/value pairs assigned to instances created + // based on this template. Consists of custom metadata or predefined + // keys; see Instance documentation for more information. + Metadata *Metadata `json:"metadata,omitempty"` + + // NetworkInterfaces: 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. Currently, + // ONE_TO_ONE_NAT is the only access config supported. If there are no + // accessConfigs specified, then this instances created based based on + // this template will have no external internet access. + NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` + + // Scheduling: Scheduling options for the instances created based on + // this template. + Scheduling *Scheduling `json:"scheduling,omitempty"` + + // ServiceAccounts: A list of service accounts each with specified + // scopes, for which access tokens are to be made available to the + // instances created based on this template, through metadata queries. + ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` + + // Tags: A list of tags to be applied to the instances created based on + // this template used to identify valid sources or targets for network + // firewalls. Provided by the client on instance creation. The tags can + // be later modified by the setTags method. Each tag within the list + // must comply with RFC1035. + Tags *Tags `json:"tags,omitempty"` +} + +type InstanceReference struct { + Instance string `json:"instance,omitempty"` +} + +type InstanceTemplate struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the instance template + // resource; provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the instance template resource; provided by the client + // when the resource is created. The name must be 1-63 characters long, + // and comply with RFC1035 + Name string `json:"name,omitempty"` + + // Properties: The instance properties portion of this instance template + // resource. + Properties *InstanceProperties `json:"properties,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type InstanceTemplateList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A list of instance template resources. + Items []*InstanceTemplate `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type InstancesScopedList struct { + // Instances: List of instances contained in this scope. + Instances []*Instance `json:"instances,omitempty"` + + // Warning: Informational warning which replaces the list of instances + // when the list is empty. + Warning *InstancesScopedListWarning `json:"warning,omitempty"` +} + +type InstancesScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*InstancesScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type InstancesScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type License struct { + // ChargesUseFee: If true, the customer will be charged license fee for + // running software that contains this license on an instance. + ChargesUseFee bool `json:"chargesUseFee,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type MachineType struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Deprecated: The deprecation status associated with this machine type. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: An optional textual description of the resource. + Description string `json:"description,omitempty"` + + // GuestCpus: Count of CPUs exposed to the instance. + GuestCpus int64 `json:"guestCpus,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // ImageSpaceGb: Space allotted for the image, defined in GB. + ImageSpaceGb int64 `json:"imageSpaceGb,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // MaximumPersistentDisks: Maximum persistent disks allowed. + MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` + + // MaximumPersistentDisksSizeGb: Maximum total persistent disks size + // (GB) allowed. + MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` + + // MemoryMb: Physical memory assigned to the instance, defined in MB. + MemoryMb int64 `json:"memoryMb,omitempty"` + + // Name: Name of the resource. + Name string `json:"name,omitempty"` + + // ScratchDisks: List of extended scratch disks assigned to the + // instance. + ScratchDisks []*MachineTypeScratchDisks `json:"scratchDisks,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Zone: Url of the zone where the machine type resides (output only). + Zone string `json:"zone,omitempty"` +} + +type MachineTypeScratchDisks struct { + // DiskGb: Size of the scratch disk, defined in GB. + DiskGb int64 `json:"diskGb,omitempty"` +} + +type MachineTypeAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped machine type lists. + Items map[string]MachineTypesScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type MachineTypeList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The machine type resources. + Items []*MachineType `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type MachineTypesScopedList struct { + // MachineTypes: List of machine types contained in this scope. + MachineTypes []*MachineType `json:"machineTypes,omitempty"` + + // Warning: Informational warning which replaces the list of machine + // types when the list is empty. + Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` +} + +type MachineTypesScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type MachineTypesScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type Metadata struct { + // Fingerprint: Fingerprint of this resource. A hash of the metadata's + // contents. This field is used for optimistic locking. An up-to-date + // metadata fingerprint must be provided in order to modify metadata. + Fingerprint string `json:"fingerprint,omitempty"` + + // Items: Array of key/value pairs. The total size of all keys and + // values must be less than 512 KB. + Items []*MetadataItems `json:"items,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` +} + +type MetadataItems 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 32768 bytes. + Value string `json:"value,omitempty"` +} + +type Network struct { + // IPv4Range: Required; The range of internal addresses that are legal + // on this network. This range is a CIDR specification, for example: + // 192.168.0.0/16. Provided by the client when the network is created. + IPv4Range string `json:"IPv4Range,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // GatewayIPv4: An optional address that is used for default routing to + // other networks. This must be within the range specified by IPv4Range, + // and is typically the first usable address in that range. If not + // specified, the default value is the first usable address in + // IPv4Range. + GatewayIPv4 string `json:"gatewayIPv4,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type NetworkInterface struct { + // AccessConfigs: 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. Currently, + // ONE_TO_ONE_NAT is the only access config supported. If there are no + // accessConfigs specified, then this instance will have no external + // internet access. + AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"` + + // Name: Name of the network interface, determined by the server; for + // network devices, these are e.g. eth0, eth1, etc. (output only). + Name string `json:"name,omitempty"` + + // Network: URL of the network resource attached to this interface. + Network string `json:"network,omitempty"` + + // NetworkIP: An optional IPV4 internal network address assigned to the + // instance for this network interface (output only). + NetworkIP string `json:"networkIP,omitempty"` +} + +type NetworkList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The network resources. + Items []*Network `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type Operation struct { + // ClientOperationId: An optional identifier specified by the client + // when the mutation was initiated. Must be unique for all operation + // resources in the project (output only). + ClientOperationId string `json:"clientOperationId,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // EndTime: The time that this operation was completed. This is in RFC + // 3339 format (output only). + EndTime string `json:"endTime,omitempty"` + + // Error: If errors occurred during processing of this operation, this + // field will be populated (output only). + Error *OperationError `json:"error,omitempty"` + + // HttpErrorMessage: If operation fails, the HTTP error message + // returned, e.g. NOT FOUND. (output only). + HttpErrorMessage string `json:"httpErrorMessage,omitempty"` + + // HttpErrorStatusCode: If operation fails, the HTTP error status code + // returned, e.g. 404. (output only). + HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // InsertTime: The time that this operation was requested. This is in + // RFC 3339 format (output only). + InsertTime string `json:"insertTime,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource (output only). + Name string `json:"name,omitempty"` + + // OperationType: Type of the operation. Examples include "insert", + // "update", and "delete" (output only). + OperationType string `json:"operationType,omitempty"` + + // Progress: An optional progress indicator that ranges from 0 to 100. + // There is no requirement that this be linear or support any + // granularity of operations. This should not be used to guess at when + // the operation will be complete. This number should be monotonically + // increasing as the operation progresses (output only). + Progress int64 `json:"progress,omitempty"` + + // Region: URL of the region where the operation resides (output only). + Region string `json:"region,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // StartTime: The time that this operation was started by the server. + // This is in RFC 3339 format (output only). + StartTime string `json:"startTime,omitempty"` + + // Status: Status of the operation. Can be one of the following: + // "PENDING", "RUNNING", or "DONE" (output only). + Status string `json:"status,omitempty"` + + // StatusMessage: An optional textual description of the current status + // of the operation (output only). + StatusMessage string `json:"statusMessage,omitempty"` + + // TargetId: Unique target id which identifies a particular incarnation + // of the target (output only). + TargetId uint64 `json:"targetId,omitempty,string"` + + // TargetLink: URL of the resource the operation is mutating (output + // only). + TargetLink string `json:"targetLink,omitempty"` + + // User: User who requested the operation, for example + // "user@example.com" (output only). + User string `json:"user,omitempty"` + + // Warnings: If warning messages generated during processing of this + // operation, this field will be populated (output only). + Warnings []*OperationWarnings `json:"warnings,omitempty"` + + // Zone: URL of the zone where the operation resides (output only). + Zone string `json:"zone,omitempty"` +} + +type OperationError struct { + // Errors: The array of errors encountered while processing this + // operation. + Errors []*OperationErrorErrors `json:"errors,omitempty"` +} + +type OperationErrorErrors struct { + // Code: The error type identifier for this error. + Code string `json:"code,omitempty"` + + // Location: Indicates the field in the request which caused the error. + // This property is optional. + Location string `json:"location,omitempty"` + + // Message: An optional, human-readable error message. + Message string `json:"message,omitempty"` +} + +type OperationWarnings struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*OperationWarningsData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type OperationWarningsData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type OperationAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped operation lists. + Items map[string]OperationsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type OperationList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The operation resources. + Items []*Operation `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type OperationsScopedList struct { + // Operations: List of operations contained in this scope. + Operations []*Operation `json:"operations,omitempty"` + + // Warning: Informational warning which replaces the list of operations + // when the list is empty. + Warning *OperationsScopedListWarning `json:"warning,omitempty"` +} + +type OperationsScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*OperationsScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type OperationsScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type PathMatcher struct { + // DefaultService: The URL to the BackendService resource. This will be + // used if none of the 'pathRules' defined by this PathMatcher is met by + // the URL's path portion. + DefaultService string `json:"defaultService,omitempty"` + + Description string `json:"description,omitempty"` + + // Name: The name to which this PathMatcher is referred by the HostRule. + Name string `json:"name,omitempty"` + + // PathRules: The list of path rules. + PathRules []*PathRule `json:"pathRules,omitempty"` +} + +type PathRule struct { + // Paths: The list of path patterns to match. Each must start with / and + // the only place a * is allowed is at the end following a /. The string + // fed to the path matcher does not include any text after the first ? + // or #, and those chars are not allowed here. + Paths []string `json:"paths,omitempty"` + + // Service: The URL of the BackendService resource if this rule is + // matched. + Service string `json:"service,omitempty"` +} + +type Project struct { + // CommonInstanceMetadata: Metadata key/value pairs available to all + // instances contained in this project. + CommonInstanceMetadata *Metadata `json:"commonInstanceMetadata,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. + Name string `json:"name,omitempty"` + + // Quotas: Quotas assigned to this project. + Quotas []*Quota `json:"quotas,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // UsageExportLocation: The location in Cloud Storage and naming method + // of the daily usage report. + UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` +} + +type Quota struct { + // Limit: Quota limit for this metric. + Limit float64 `json:"limit,omitempty"` + + // Metric: Name of the quota metric. + Metric string `json:"metric,omitempty"` + + // Usage: Current usage of this metric. + Usage float64 `json:"usage,omitempty"` +} + +type Region struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Deprecated: The deprecation status associated with this region. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: Textual description of the resource. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource. + Name string `json:"name,omitempty"` + + // Quotas: Quotas assigned to this region. + Quotas []*Quota `json:"quotas,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Status: Status of the region, "UP" or "DOWN". + Status string `json:"status,omitempty"` + + // Zones: A list of zones homed in this region, in the form of resource + // URLs. + Zones []string `json:"zones,omitempty"` +} + +type RegionList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The region resources. + Items []*Region `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type ResourceGroupReference struct { + // Group: A URI referencing one of the resource views listed in the + // backend service. + Group string `json:"group,omitempty"` +} + +type Route struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // DestRange: Which packets does this route apply to? + DestRange string `json:"destRange,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // Network: URL of the network to which this route is applied; provided + // by the client when the route is created. + Network string `json:"network,omitempty"` + + // NextHopGateway: The URL to a gateway that should handle matching + // packets. + NextHopGateway string `json:"nextHopGateway,omitempty"` + + // NextHopInstance: The URL to an instance that should handle matching + // packets. + NextHopInstance string `json:"nextHopInstance,omitempty"` + + // NextHopIp: The network IP address of an instance that should handle + // matching packets. + NextHopIp string `json:"nextHopIp,omitempty"` + + // NextHopNetwork: The URL of the local network if it should handle + // matching packets. + NextHopNetwork string `json:"nextHopNetwork,omitempty"` + + // Priority: Breaks ties between Routes of equal specificity. Routes + // with smaller values win when tied with routes with larger values. + Priority int64 `json:"priority,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Tags: A list of instance tags to which this route applies. + Tags []string `json:"tags,omitempty"` + + // Warnings: If potential misconfigurations are detected for this route, + // this field will be populated with warning messages. + Warnings []*RouteWarnings `json:"warnings,omitempty"` +} + +type RouteWarnings struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*RouteWarningsData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type RouteWarningsData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type RouteList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The route resources. + Items []*Route `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type Scheduling struct { + // AutomaticRestart: Whether the Instance should be automatically + // restarted whenever it is terminated by Compute Engine (not terminated + // by user). + AutomaticRestart bool `json:"automaticRestart,omitempty"` + + // OnHostMaintenance: How the instance should behave when the host + // machine undergoes maintenance that may temporarily impact instance + // performance. + OnHostMaintenance string `json:"onHostMaintenance,omitempty"` +} + +type SerialPortOutput struct { + // Contents: The contents of the console output. + Contents string `json:"contents,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type ServiceAccount struct { + // Email: Email address of the service account. + Email string `json:"email,omitempty"` + + // Scopes: The list of scopes to be made available for this service + // account. + Scopes []string `json:"scopes,omitempty"` +} + +type Snapshot struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // DiskSizeGb: Size of the persistent disk snapshot, specified in GB + // (output only). + DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Licenses: Public visible licenses. + Licenses []string `json:"licenses,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. + Name string `json:"name,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // SourceDisk: The source disk used to create this snapshot. + SourceDisk string `json:"sourceDisk,omitempty"` + + // SourceDiskId: The 'id' value of the disk used to create this + // snapshot. This value may be used to determine whether the snapshot + // was taken from the current or a previous instance of a given disk + // name. + SourceDiskId string `json:"sourceDiskId,omitempty"` + + // Status: The status of the persistent disk snapshot (output only). + Status string `json:"status,omitempty"` + + // StorageBytes: A size of the the storage used by the snapshot. As + // snapshots share storage this number is expected to change with + // snapshot creation/deletion. + StorageBytes int64 `json:"storageBytes,omitempty,string"` + + // StorageBytesStatus: An indicator whether storageBytes is in a stable + // state, or it is being adjusted as a result of shared storage + // reallocation. + StorageBytesStatus string `json:"storageBytesStatus,omitempty"` +} + +type SnapshotList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The persistent snapshot resources. + Items []*Snapshot `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type Tags struct { + // Fingerprint: Fingerprint of this resource. A hash of the tags stored + // in this object. This field is used optimistic locking. An up-to-date + // tags fingerprint must be provided in order to modify tags. + Fingerprint string `json:"fingerprint,omitempty"` + + // Items: An array of tags. Each tag must be 1-63 characters long, and + // comply with RFC1035. + Items []string `json:"items,omitempty"` +} + +type TargetHttpProxy struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // UrlMap: URL to the UrlMap resource that defines the mapping from URL + // to the BackendService. + UrlMap string `json:"urlMap,omitempty"` +} + +type TargetHttpProxyList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The TargetHttpProxy resources. + Items []*TargetHttpProxy `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type TargetInstance struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Instance: The URL to the instance that terminates the relevant + // traffic. + Instance string `json:"instance,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // NatPolicy: NAT option controlling how IPs are NAT'ed to the VM. + // Currently only NO_NAT (default value) is supported. + NatPolicy string `json:"natPolicy,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Zone: URL of the zone where the target instance resides (output + // only). + Zone string `json:"zone,omitempty"` +} + +type TargetInstanceAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped target instance lists. + Items map[string]TargetInstancesScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type TargetInstanceList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The TargetInstance resources. + Items []*TargetInstance `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type TargetInstancesScopedList struct { + // TargetInstances: List of target instances contained in this scope. + TargetInstances []*TargetInstance `json:"targetInstances,omitempty"` + + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *TargetInstancesScopedListWarning `json:"warning,omitempty"` +} + +type TargetInstancesScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*TargetInstancesScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type TargetInstancesScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type TargetPool struct { + // BackupPool: This field is applicable only when the containing target + // pool is serving a forwarding rule as the primary pool, and its + // 'failoverRatio' field is properly set to a value between [0, + // 1]. + // + // 'backupPool' and 'failoverRatio' together define the fallback + // behavior of the primary target pool: if the ratio of the healthy VMs + // in the primary pool is at or below 'failoverRatio', traffic arriving + // at the load-balanced IP will be directed to the backup pool. + // + // In case + // where 'failoverRatio' and 'backupPool' are not set, or all the VMs in + // the backup pool are unhealthy, the traffic will be directed back to + // the primary pool 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. + BackupPool string `json:"backupPool,omitempty"` + + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,omitempty"` + + // FailoverRatio: This field is applicable only when the containing + // target pool is serving a forwarding rule as the primary pool (i.e., + // not as a backup pool to some other target pool). The value of the + // field must be in [0, 1]. + // + // If set, 'backupPool' must also be set. They + // together define the fallback behavior of the primary target pool: if + // the ratio of the healthy VMs in the primary pool is at or below this + // number, traffic arriving at the load-balanced IP will be directed to + // the backup pool. + // + // In case where 'failoverRatio' is not set or all the + // VMs in the backup pool are unhealthy, the traffic will be directed + // back to the primary pool 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. + FailoverRatio float64 `json:"failoverRatio,omitempty"` + + // HealthChecks: A list of URLs to the HttpHealthCheck resource. A + // member VM in this pool is considered healthy if and only if all + // specified health checks pass. An empty list means all member VMs will + // be considered healthy at all times. + HealthChecks []string `json:"healthChecks,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Instances: A list of resource URLs to the member VMs serving this + // pool. They must live in zones contained in the same region as this + // pool. + Instances []string `json:"instances,omitempty"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // Region: URL of the region where the target pool resides (output + // only). + Region string `json:"region,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // SessionAffinity: Sesssion affinity option, must be one of the + // following values: 'NONE': Connections from the same client IP may go + // to any VM in the pool; 'CLIENT_IP': Connections from the same client + // IP will go to the same VM in the pool while that VM remains healthy. + // 'CLIENT_IP_PROTO': Connections from the same client IP with the same + // IP protocol will go to the same VM in the pool while that VM remains + // healthy. + SessionAffinity string `json:"sessionAffinity,omitempty"` +} + +type TargetPoolAggregatedList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: A map of scoped target pool lists. + Items map[string]TargetPoolsScopedList `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type TargetPoolInstanceHealth struct { + HealthStatus []*HealthStatus `json:"healthStatus,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` +} + +type TargetPoolList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The TargetPool resources. + Items []*TargetPool `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type TargetPoolsAddHealthCheckRequest struct { + // HealthChecks: Health check URLs to be added to targetPool. + HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` +} + +type TargetPoolsAddInstanceRequest struct { + // Instances: URLs of the instances to be added to targetPool. + Instances []*InstanceReference `json:"instances,omitempty"` +} + +type TargetPoolsRemoveHealthCheckRequest struct { + // HealthChecks: Health check URLs to be removed from targetPool. + HealthChecks []*HealthCheckReference `json:"healthChecks,omitempty"` +} + +type TargetPoolsRemoveInstanceRequest struct { + // Instances: URLs of the instances to be removed from targetPool. + Instances []*InstanceReference `json:"instances,omitempty"` +} + +type TargetPoolsScopedList struct { + // TargetPools: List of target pools contained in this scope. + TargetPools []*TargetPool `json:"targetPools,omitempty"` + + // Warning: Informational warning which replaces the list of addresses + // when the list is empty. + Warning *TargetPoolsScopedListWarning `json:"warning,omitempty"` +} + +type TargetPoolsScopedListWarning struct { + // Code: The warning type identifier for this warning. + Code string `json:"code,omitempty"` + + // Data: Metadata for this warning in 'key: value' format. + Data []*TargetPoolsScopedListWarningData `json:"data,omitempty"` + + // Message: Optional human-readable details for this warning. + Message string `json:"message,omitempty"` +} + +type TargetPoolsScopedListWarningData struct { + // Key: A key for the warning data. + Key string `json:"key,omitempty"` + + // Value: A warning data value corresponding to the key. + Value string `json:"value,omitempty"` +} + +type TargetReference struct { + Target string `json:"target,omitempty"` +} + +type TestFailure struct { + ActualService string `json:"actualService,omitempty"` + + ExpectedService string `json:"expectedService,omitempty"` + + Host string `json:"host,omitempty"` + + Path string `json:"path,omitempty"` +} + +type UrlMap struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // DefaultService: The URL of the BackendService resource if none of the + // hostRules match. + DefaultService string `json:"defaultService,omitempty"` + + // Description: An optional textual description of the resource; + // provided by the client when the resource is created. + Description string `json:"description,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 UrlMap. An up-to-date + // fingerprint must be provided in order to update the UrlMap. + Fingerprint string `json:"fingerprint,omitempty"` + + // HostRules: The list of HostRules to use against the URL. + HostRules []*HostRule `json:"hostRules,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // Name: Name of the resource; provided by the client when the resource + // is created. The name must be 1-63 characters long, and comply with + // RFC1035. + Name string `json:"name,omitempty"` + + // PathMatchers: The list of named PathMatchers to use against the URL. + PathMatchers []*PathMatcher `json:"pathMatchers,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Tests: The list of expected URL mappings. Request to update this + // UrlMap will succeed only all of the test cases pass. + Tests []*UrlMapTest `json:"tests,omitempty"` +} + +type UrlMapList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The UrlMap resources. + Items []*UrlMap `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +type UrlMapReference struct { + UrlMap string `json:"urlMap,omitempty"` +} + +type UrlMapTest struct { + // Description: Description of this test case. + Description string `json:"description,omitempty"` + + // Host: Host portion of the URL. + Host string `json:"host,omitempty"` + + // Path: Path portion of the URL. + Path string `json:"path,omitempty"` + + // Service: Expected BackendService resource the given URL should be + // mapped to. + Service string `json:"service,omitempty"` +} + +type UrlMapValidationResult struct { + LoadErrors []string `json:"loadErrors,omitempty"` + + // LoadSucceeded: Whether the given UrlMap can be successfully loaded. + // If false, 'loadErrors' indicates the reasons. + LoadSucceeded bool `json:"loadSucceeded,omitempty"` + + TestFailures []*TestFailure `json:"testFailures,omitempty"` + + // TestPassed: If successfully loaded, this field indicates whether the + // test passed. If false, 'testFailures's indicate the reason of + // failure. + TestPassed bool `json:"testPassed,omitempty"` +} + +type UrlMapsValidateRequest struct { + // Resource: Content of the UrlMap to be validated. + Resource *UrlMap `json:"resource,omitempty"` +} + +type UrlMapsValidateResponse struct { + Result *UrlMapValidationResult `json:"result,omitempty"` +} + +type UsageExportLocation struct { + // BucketName: The name of an existing bucket in Cloud Storage where the + // usage report object is stored. The Google Service Account is granted + // write access to this bucket. This is simply the bucket name, with no + // "gs://" or "https://storage.googleapis.com/" in front of it. + BucketName string `json:"bucketName,omitempty"` + + // ReportNamePrefix: An optional prefix for the name of the usage report + // object stored in bucket_name. If not supplied, defaults to "usage_". + // The report is stored as a CSV file named _gce_.csv. where is the day + // of the usage according to Pacific Time. The prefix should conform to + // Cloud Storage object naming conventions. + ReportNamePrefix string `json:"reportNamePrefix,omitempty"` +} + +type Zone struct { + // CreationTimestamp: Creation timestamp in RFC3339 text format (output + // only). + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Deprecated: The deprecation status associated with this zone. + Deprecated *DeprecationStatus `json:"deprecated,omitempty"` + + // Description: Textual description of the resource. + Description string `json:"description,omitempty"` + + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id uint64 `json:"id,omitempty,string"` + + // Kind: Type of the resource. + Kind string `json:"kind,omitempty"` + + // MaintenanceWindows: Scheduled maintenance windows for the zone. When + // the zone is in a maintenance window, all resources which reside in + // the zone will be unavailable. + MaintenanceWindows []*ZoneMaintenanceWindows `json:"maintenanceWindows,omitempty"` + + // Name: Name of the resource. + Name string `json:"name,omitempty"` + + // Region: Full URL reference to the region which hosts the zone (output + // only). + Region string `json:"region,omitempty"` + + // SelfLink: Server defined URL for the resource (output only). + SelfLink string `json:"selfLink,omitempty"` + + // Status: Status of the zone. "UP" or "DOWN". + Status string `json:"status,omitempty"` +} + +type ZoneMaintenanceWindows struct { + // BeginTime: Begin time of the maintenance window, in RFC 3339 format. + BeginTime string `json:"beginTime,omitempty"` + + // Description: Textual description of the maintenance window. + Description string `json:"description,omitempty"` + + // EndTime: End time of the maintenance window, in RFC 3339 format. + EndTime string `json:"endTime,omitempty"` + + // Name: Name of the maintenance window. + Name string `json:"name,omitempty"` +} + +type ZoneList struct { + // Id: Unique identifier for the resource; defined by the server (output + // only). + Id string `json:"id,omitempty"` + + // Items: The zone resources. + Items []*Zone `json:"items,omitempty"` + + // Kind: Type of resource. + Kind string `json:"kind,omitempty"` + + // NextPageToken: A token used to continue a truncated list request + // (output only). + NextPageToken string `json:"nextPageToken,omitempty"` + + // SelfLink: Server defined URL for this resource (output only). + SelfLink string `json:"selfLink,omitempty"` +} + +// method id "compute.addresses.aggregatedList": + +type AddressesAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of addresses grouped by scope. +func (r *AddressesService) AggregatedList(project string) *AddressesAggregatedListCall { + c := &AddressesAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *AddressesAggregatedListCall) Filter(filter string) *AddressesAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *AddressesAggregatedListCall) MaxResults(maxResults int64) *AddressesAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *AddressesAggregatedListCall) PageToken(pageToken string) *AddressesAggregatedListCall { + c.opt_["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 *AddressesAggregatedListCall) Fields(s ...googleapi.Field) *AddressesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *AddressesAggregatedListCall) Do() (*AddressAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/addresses") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *AddressAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of addresses grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.addresses.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/addresses", + // "response": { + // "$ref": "AddressAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.addresses.delete": + +type AddressesDeleteCall struct { + s *Service + project string + region string + address string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified address resource. +func (r *AddressesService) Delete(project string, region string, address string) *AddressesDeleteCall { + c := &AddressesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesDeleteCall) Fields(s ...googleapi.Field) *AddressesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *AddressesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "address": c.address, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified address resource.", + // "httpMethod": "DELETE", + // "id": "compute.addresses.delete", + // "parameterOrder": [ + // "project", + // "region", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/addresses/{address}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.addresses.get": + +type AddressesGetCall struct { + s *Service + project string + region string + address string + opt_ map[string]interface{} +} + +// Get: Returns the specified address resource. +func (r *AddressesService) Get(project string, region string, address string) *AddressesGetCall { + c := &AddressesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesGetCall) Fields(s ...googleapi.Field) *AddressesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *AddressesGetCall) Do() (*Address, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses/{address}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "address": c.address, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Address + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified address resource.", + // "httpMethod": "GET", + // "id": "compute.addresses.get", + // "parameterOrder": [ + // "project", + // "region", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/addresses/{address}", + // "response": { + // "$ref": "Address" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.addresses.insert": + +type AddressesInsertCall struct { + s *Service + project string + region string + address *Address + opt_ map[string]interface{} +} + +// Insert: Creates an address resource in the specified project using +// the data included in the request. +func (r *AddressesService) Insert(project string, region string, address *Address) *AddressesInsertCall { + c := &AddressesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *AddressesInsertCall) Fields(s ...googleapi.Field) *AddressesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *AddressesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an address resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.addresses.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/addresses", + // "request": { + // "$ref": "Address" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.addresses.list": + +type AddressesListCall struct { + s *Service + project string + region string + opt_ map[string]interface{} +} + +// List: Retrieves the list of address resources contained within the +// specified region. +func (r *AddressesService) List(project string, region string) *AddressesListCall { + c := &AddressesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *AddressesListCall) Filter(filter string) *AddressesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *AddressesListCall) MaxResults(maxResults int64) *AddressesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *AddressesListCall) PageToken(pageToken string) *AddressesListCall { + c.opt_["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 *AddressesListCall) Fields(s ...googleapi.Field) *AddressesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *AddressesListCall) Do() (*AddressList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/addresses") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *AddressList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of address resources contained within the specified region.", + // "httpMethod": "GET", + // "id": "compute.addresses.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/addresses", + // "response": { + // "$ref": "AddressList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.backendServices.delete": + +type BackendServicesDeleteCall struct { + s *Service + project string + backendService string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified BackendService resource. +func (r *BackendServicesService) Delete(project string, backendService string) *BackendServicesDeleteCall { + c := &BackendServicesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.backendService = backendService + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesDeleteCall) Fields(s ...googleapi.Field) *BackendServicesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified BackendService resource.", + // "httpMethod": "DELETE", + // "id": "compute.backendServices.delete", + // "parameterOrder": [ + // "project", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices/{backendService}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendServices.get": + +type BackendServicesGetCall struct { + s *Service + project string + backendService string + opt_ map[string]interface{} +} + +// Get: Returns the specified BackendService resource. +func (r *BackendServicesService) Get(project string, backendService string) *BackendServicesGetCall { + c := &BackendServicesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.backendService = backendService + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesGetCall) Fields(s ...googleapi.Field) *BackendServicesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesGetCall) Do() (*BackendService, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *BackendService + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified BackendService resource.", + // "httpMethod": "GET", + // "id": "compute.backendServices.get", + // "parameterOrder": [ + // "project", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices/{backendService}", + // "response": { + // "$ref": "BackendService" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.backendServices.getHealth": + +type BackendServicesGetHealthCall struct { + s *Service + project string + backendService string + resourcegroupreference *ResourceGroupReference + opt_ map[string]interface{} +} + +// GetHealth: Gets the most recent health check results for this +// BackendService. +func (r *BackendServicesService) GetHealth(project string, backendService string, resourcegroupreference *ResourceGroupReference) *BackendServicesGetHealthCall { + c := &BackendServicesGetHealthCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.backendService = backendService + c.resourcegroupreference = resourcegroupreference + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesGetHealthCall) Fields(s ...googleapi.Field) *BackendServicesGetHealthCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesGetHealthCall) Do() (*BackendServiceGroupHealth, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}/getHealth") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *BackendServiceGroupHealth + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the most recent health check results for this BackendService.", + // "httpMethod": "POST", + // "id": "compute.backendServices.getHealth", + // "parameterOrder": [ + // "project", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to which the queried instance belongs.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices/{backendService}/getHealth", + // "request": { + // "$ref": "ResourceGroupReference" + // }, + // "response": { + // "$ref": "BackendServiceGroupHealth" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.backendServices.insert": + +type BackendServicesInsertCall struct { + s *Service + project string + backendservice *BackendService + opt_ map[string]interface{} +} + +// Insert: Creates a BackendService resource in the specified project +// using the data included in the request. +func (r *BackendServicesService) Insert(project string, backendservice *BackendService) *BackendServicesInsertCall { + c := &BackendServicesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.backendservice = backendservice + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesInsertCall) Fields(s ...googleapi.Field) *BackendServicesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a BackendService resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.backendServices.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices", + // "request": { + // "$ref": "BackendService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendServices.list": + +type BackendServicesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of BackendService resources available to the +// specified project. +func (r *BackendServicesService) List(project string) *BackendServicesListCall { + c := &BackendServicesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *BackendServicesListCall) Filter(filter string) *BackendServicesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *BackendServicesListCall) MaxResults(maxResults int64) *BackendServicesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *BackendServicesListCall) PageToken(pageToken string) *BackendServicesListCall { + c.opt_["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 *BackendServicesListCall) Fields(s ...googleapi.Field) *BackendServicesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesListCall) Do() (*BackendServiceList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *BackendServiceList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of BackendService resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.backendServices.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices", + // "response": { + // "$ref": "BackendServiceList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.backendServices.patch": + +type BackendServicesPatchCall struct { + s *Service + project string + backendService string + backendservice *BackendService + opt_ map[string]interface{} +} + +// Patch: Update the entire content of the BackendService resource. This +// method supports patch semantics. +func (r *BackendServicesService) Patch(project string, backendService string, backendservice *BackendService) *BackendServicesPatchCall { + c := &BackendServicesPatchCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.backendService = backendService + c.backendservice = backendservice + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesPatchCall) Fields(s ...googleapi.Field) *BackendServicesPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesPatchCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the entire content of the BackendService resource. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "compute.backendServices.patch", + // "parameterOrder": [ + // "project", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices/{backendService}", + // "request": { + // "$ref": "BackendService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.backendServices.update": + +type BackendServicesUpdateCall struct { + s *Service + project string + backendService string + backendservice *BackendService + opt_ map[string]interface{} +} + +// Update: Update the entire content of the BackendService resource. +func (r *BackendServicesService) Update(project string, backendService string, backendservice *BackendService) *BackendServicesUpdateCall { + c := &BackendServicesUpdateCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.backendService = backendService + c.backendservice = backendservice + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *BackendServicesUpdateCall) Fields(s ...googleapi.Field) *BackendServicesUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *BackendServicesUpdateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/backendServices/{backendService}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PUT", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the entire content of the BackendService resource.", + // "httpMethod": "PUT", + // "id": "compute.backendServices.update", + // "parameterOrder": [ + // "project", + // "backendService" + // ], + // "parameters": { + // "backendService": { + // "description": "Name of the BackendService resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/backendServices/{backendService}", + // "request": { + // "$ref": "BackendService" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.diskTypes.aggregatedList": + +type DiskTypesAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of disk type resources grouped by +// scope. +func (r *DiskTypesService) AggregatedList(project string) *DiskTypesAggregatedListCall { + c := &DiskTypesAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *DiskTypesAggregatedListCall) Filter(filter string) *DiskTypesAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *DiskTypesAggregatedListCall) MaxResults(maxResults int64) *DiskTypesAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *DiskTypesAggregatedListCall) PageToken(pageToken string) *DiskTypesAggregatedListCall { + c.opt_["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 *DiskTypesAggregatedListCall) Fields(s ...googleapi.Field) *DiskTypesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DiskTypesAggregatedListCall) Do() (*DiskTypeAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/diskTypes") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *DiskTypeAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of disk type resources grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.diskTypes.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/diskTypes", + // "response": { + // "$ref": "DiskTypeAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.diskTypes.get": + +type DiskTypesGetCall struct { + s *Service + project string + zone string + diskType string + opt_ map[string]interface{} +} + +// Get: Returns the specified disk type resource. +func (r *DiskTypesService) Get(project string, zone string, diskType string) *DiskTypesGetCall { + c := &DiskTypesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.diskType = diskType + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DiskTypesGetCall) Fields(s ...googleapi.Field) *DiskTypesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DiskTypesGetCall) Do() (*DiskType, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes/{diskType}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "diskType": c.diskType, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *DiskType + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified disk type resource.", + // "httpMethod": "GET", + // "id": "compute.diskTypes.get", + // "parameterOrder": [ + // "project", + // "zone", + // "diskType" + // ], + // "parameters": { + // "diskType": { + // "description": "Name of the disk type resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/diskTypes/{diskType}", + // "response": { + // "$ref": "DiskType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.diskTypes.list": + +type DiskTypesListCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// List: Retrieves the list of disk type resources available to the +// specified project. +func (r *DiskTypesService) List(project string, zone string) *DiskTypesListCall { + c := &DiskTypesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *DiskTypesListCall) Filter(filter string) *DiskTypesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *DiskTypesListCall) MaxResults(maxResults int64) *DiskTypesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *DiskTypesListCall) PageToken(pageToken string) *DiskTypesListCall { + c.opt_["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 *DiskTypesListCall) Fields(s ...googleapi.Field) *DiskTypesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DiskTypesListCall) Do() (*DiskTypeList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/diskTypes") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *DiskTypeList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of disk type resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.diskTypes.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/diskTypes", + // "response": { + // "$ref": "DiskTypeList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.disks.aggregatedList": + +type DisksAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of disks grouped by scope. +func (r *DisksService) AggregatedList(project string) *DisksAggregatedListCall { + c := &DisksAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *DisksAggregatedListCall) Filter(filter string) *DisksAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *DisksAggregatedListCall) MaxResults(maxResults int64) *DisksAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *DisksAggregatedListCall) PageToken(pageToken string) *DisksAggregatedListCall { + c.opt_["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 *DisksAggregatedListCall) Fields(s ...googleapi.Field) *DisksAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DisksAggregatedListCall) Do() (*DiskAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/disks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *DiskAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of disks grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.disks.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/disks", + // "response": { + // "$ref": "DiskAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.disks.createSnapshot": + +type DisksCreateSnapshotCall struct { + s *Service + project string + zone string + disk string + snapshot *Snapshot + opt_ map[string]interface{} +} + +// CreateSnapshot: +func (r *DisksService) CreateSnapshot(project string, zone string, disk string, snapshot *Snapshot) *DisksCreateSnapshotCall { + c := &DisksCreateSnapshotCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.disk = disk + c.snapshot = snapshot + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DisksCreateSnapshotCall) Fields(s ...googleapi.Field) *DisksCreateSnapshotCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DisksCreateSnapshotCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}/createSnapshot") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "disk": c.disk, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "httpMethod": "POST", + // "id": "compute.disks.createSnapshot", + // "parameterOrder": [ + // "project", + // "zone", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "Name of the persistent disk resource to snapshot.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", + // "request": { + // "$ref": "Snapshot" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.disks.delete": + +type DisksDeleteCall struct { + s *Service + project string + zone string + disk string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified persistent disk resource. +func (r *DisksService) Delete(project string, zone string, disk string) *DisksDeleteCall { + c := &DisksDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.disk = disk + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DisksDeleteCall) Fields(s ...googleapi.Field) *DisksDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DisksDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "disk": c.disk, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified persistent disk resource.", + // "httpMethod": "DELETE", + // "id": "compute.disks.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "Name of the persistent disk resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks/{disk}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.disks.get": + +type DisksGetCall struct { + s *Service + project string + zone string + disk string + opt_ map[string]interface{} +} + +// Get: Returns the specified persistent disk resource. +func (r *DisksService) Get(project string, zone string, disk string) *DisksGetCall { + c := &DisksGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.disk = disk + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DisksGetCall) Fields(s ...googleapi.Field) *DisksGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DisksGetCall) Do() (*Disk, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks/{disk}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "disk": c.disk, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Disk + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified persistent disk resource.", + // "httpMethod": "GET", + // "id": "compute.disks.get", + // "parameterOrder": [ + // "project", + // "zone", + // "disk" + // ], + // "parameters": { + // "disk": { + // "description": "Name of the persistent disk resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks/{disk}", + // "response": { + // "$ref": "Disk" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.disks.insert": + +type DisksInsertCall struct { + s *Service + project string + zone string + disk *Disk + opt_ map[string]interface{} +} + +// Insert: Creates a persistent disk resource in the specified project +// using the data included in the request. +func (r *DisksService) Insert(project string, zone string, disk *Disk) *DisksInsertCall { + c := &DisksInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.disk = disk + return c +} + +// SourceImage sets the optional parameter "sourceImage": Source image +// to restore onto a disk. +func (c *DisksInsertCall) SourceImage(sourceImage string) *DisksInsertCall { + c.opt_["sourceImage"] = sourceImage + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *DisksInsertCall) Fields(s ...googleapi.Field) *DisksInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DisksInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["sourceImage"]; ok { + params.Set("sourceImage", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a persistent disk resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.disks.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "sourceImage": { + // "description": "Optional. Source image to restore onto a disk.", + // "location": "query", + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks", + // "request": { + // "$ref": "Disk" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.disks.list": + +type DisksListCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// List: Retrieves the list of persistent disk resources contained +// within the specified zone. +func (r *DisksService) List(project string, zone string) *DisksListCall { + c := &DisksListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *DisksListCall) Filter(filter string) *DisksListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *DisksListCall) MaxResults(maxResults int64) *DisksListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *DisksListCall) PageToken(pageToken string) *DisksListCall { + c.opt_["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 *DisksListCall) Fields(s ...googleapi.Field) *DisksListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *DisksListCall) Do() (*DiskList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/disks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *DiskList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of persistent disk resources contained within the specified zone.", + // "httpMethod": "GET", + // "id": "compute.disks.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/disks", + // "response": { + // "$ref": "DiskList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.firewalls.delete": + +type FirewallsDeleteCall struct { + s *Service + project string + firewall string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified firewall resource. +func (r *FirewallsService) Delete(project string, firewall string) *FirewallsDeleteCall { + c := &FirewallsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.firewall = firewall + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FirewallsDeleteCall) Fields(s ...googleapi.Field) *FirewallsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *FirewallsDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "firewall": c.firewall, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified firewall resource.", + // "httpMethod": "DELETE", + // "id": "compute.firewalls.delete", + // "parameterOrder": [ + // "project", + // "firewall" + // ], + // "parameters": { + // "firewall": { + // "description": "Name of the firewall resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/firewalls/{firewall}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.firewalls.get": + +type FirewallsGetCall struct { + s *Service + project string + firewall string + opt_ map[string]interface{} +} + +// Get: Returns the specified firewall resource. +func (r *FirewallsService) Get(project string, firewall string) *FirewallsGetCall { + c := &FirewallsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.firewall = firewall + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FirewallsGetCall) Fields(s ...googleapi.Field) *FirewallsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *FirewallsGetCall) Do() (*Firewall, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "firewall": c.firewall, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Firewall + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified firewall resource.", + // "httpMethod": "GET", + // "id": "compute.firewalls.get", + // "parameterOrder": [ + // "project", + // "firewall" + // ], + // "parameters": { + // "firewall": { + // "description": "Name of the firewall resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/firewalls/{firewall}", + // "response": { + // "$ref": "Firewall" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.firewalls.insert": + +type FirewallsInsertCall struct { + s *Service + project string + firewall *Firewall + opt_ map[string]interface{} +} + +// Insert: Creates a firewall resource in the specified project using +// the data included in the request. +func (r *FirewallsService) Insert(project string, firewall *Firewall) *FirewallsInsertCall { + c := &FirewallsInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.firewall = firewall + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FirewallsInsertCall) Fields(s ...googleapi.Field) *FirewallsInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *FirewallsInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a firewall resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.firewalls.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/firewalls", + // "request": { + // "$ref": "Firewall" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.firewalls.list": + +type FirewallsListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of firewall resources available to the +// specified project. +func (r *FirewallsService) List(project string) *FirewallsListCall { + c := &FirewallsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *FirewallsListCall) Filter(filter string) *FirewallsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *FirewallsListCall) MaxResults(maxResults int64) *FirewallsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *FirewallsListCall) PageToken(pageToken string) *FirewallsListCall { + c.opt_["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 *FirewallsListCall) Fields(s ...googleapi.Field) *FirewallsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *FirewallsListCall) Do() (*FirewallList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *FirewallList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of firewall resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.firewalls.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/firewalls", + // "response": { + // "$ref": "FirewallList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.firewalls.patch": + +type FirewallsPatchCall struct { + s *Service + project string + firewall string + firewall2 *Firewall + opt_ map[string]interface{} +} + +// Patch: Updates the specified firewall resource with the data included +// in the request. This method supports patch semantics. +func (r *FirewallsService) Patch(project string, firewall string, firewall2 *Firewall) *FirewallsPatchCall { + c := &FirewallsPatchCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.firewall = firewall + c.firewall2 = firewall2 + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FirewallsPatchCall) Fields(s ...googleapi.Field) *FirewallsPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *FirewallsPatchCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "firewall": c.firewall, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified firewall resource with the data included in the request. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "compute.firewalls.patch", + // "parameterOrder": [ + // "project", + // "firewall" + // ], + // "parameters": { + // "firewall": { + // "description": "Name of the firewall resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/firewalls/{firewall}", + // "request": { + // "$ref": "Firewall" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.firewalls.update": + +type FirewallsUpdateCall struct { + s *Service + project string + firewall string + firewall2 *Firewall + opt_ map[string]interface{} +} + +// Update: Updates the specified firewall resource with the data +// included in the request. +func (r *FirewallsService) Update(project string, firewall string, firewall2 *Firewall) *FirewallsUpdateCall { + c := &FirewallsUpdateCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.firewall = firewall + c.firewall2 = firewall2 + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *FirewallsUpdateCall) Fields(s ...googleapi.Field) *FirewallsUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *FirewallsUpdateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewall2) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/firewalls/{firewall}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PUT", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "firewall": c.firewall, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates the specified firewall resource with the data included in the request.", + // "httpMethod": "PUT", + // "id": "compute.firewalls.update", + // "parameterOrder": [ + // "project", + // "firewall" + // ], + // "parameters": { + // "firewall": { + // "description": "Name of the firewall resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/firewalls/{firewall}", + // "request": { + // "$ref": "Firewall" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.forwardingRules.aggregatedList": + +type ForwardingRulesAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of forwarding rules grouped by +// scope. +func (r *ForwardingRulesService) AggregatedList(project string) *ForwardingRulesAggregatedListCall { + c := &ForwardingRulesAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *ForwardingRulesAggregatedListCall) Filter(filter string) *ForwardingRulesAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *ForwardingRulesAggregatedListCall) MaxResults(maxResults int64) *ForwardingRulesAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *ForwardingRulesAggregatedListCall) PageToken(pageToken string) *ForwardingRulesAggregatedListCall { + c.opt_["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 *ForwardingRulesAggregatedListCall) Fields(s ...googleapi.Field) *ForwardingRulesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ForwardingRulesAggregatedListCall) Do() (*ForwardingRuleAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/forwardingRules") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ForwardingRuleAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of forwarding rules grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.forwardingRules.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/forwardingRules", + // "response": { + // "$ref": "ForwardingRuleAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.forwardingRules.delete": + +type ForwardingRulesDeleteCall struct { + s *Service + project string + region string + forwardingRule string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified ForwardingRule resource. +func (r *ForwardingRulesService) Delete(project string, region string, forwardingRule string) *ForwardingRulesDeleteCall { + c := &ForwardingRulesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *ForwardingRulesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ForwardingRulesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified ForwardingRule resource.", + // "httpMethod": "DELETE", + // "id": "compute.forwardingRules.delete", + // "parameterOrder": [ + // "project", + // "region", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.forwardingRules.get": + +type ForwardingRulesGetCall struct { + s *Service + project string + region string + forwardingRule string + opt_ map[string]interface{} +} + +// Get: Returns the specified ForwardingRule resource. +func (r *ForwardingRulesService) Get(project string, region string, forwardingRule string) *ForwardingRulesGetCall { + c := &ForwardingRulesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ForwardingRulesGetCall) Fields(s ...googleapi.Field) *ForwardingRulesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ForwardingRulesGetCall) Do() (*ForwardingRule, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ForwardingRule + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified ForwardingRule resource.", + // "httpMethod": "GET", + // "id": "compute.forwardingRules.get", + // "parameterOrder": [ + // "project", + // "region", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}", + // "response": { + // "$ref": "ForwardingRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.forwardingRules.insert": + +type ForwardingRulesInsertCall struct { + s *Service + project string + region string + forwardingrule *ForwardingRule + opt_ map[string]interface{} +} + +// Insert: Creates a ForwardingRule resource in the specified project +// and region using the data included in the request. +func (r *ForwardingRulesService) Insert(project string, region string, forwardingrule *ForwardingRule) *ForwardingRulesInsertCall { + c := &ForwardingRulesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.forwardingrule = forwardingrule + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ForwardingRulesInsertCall) Fields(s ...googleapi.Field) *ForwardingRulesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ForwardingRulesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.forwardingRules.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/forwardingRules", + // "request": { + // "$ref": "ForwardingRule" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.forwardingRules.list": + +type ForwardingRulesListCall struct { + s *Service + project string + region string + opt_ map[string]interface{} +} + +// List: Retrieves the list of ForwardingRule resources available to the +// specified project and region. +func (r *ForwardingRulesService) List(project string, region string) *ForwardingRulesListCall { + c := &ForwardingRulesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *ForwardingRulesListCall) Filter(filter string) *ForwardingRulesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *ForwardingRulesListCall) MaxResults(maxResults int64) *ForwardingRulesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *ForwardingRulesListCall) PageToken(pageToken string) *ForwardingRulesListCall { + c.opt_["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 *ForwardingRulesListCall) Fields(s ...googleapi.Field) *ForwardingRulesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ForwardingRulesListCall) Do() (*ForwardingRuleList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ForwardingRuleList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of ForwardingRule resources available to the specified project and region.", + // "httpMethod": "GET", + // "id": "compute.forwardingRules.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/forwardingRules", + // "response": { + // "$ref": "ForwardingRuleList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.forwardingRules.setTarget": + +type ForwardingRulesSetTargetCall struct { + s *Service + project string + region string + forwardingRule string + targetreference *TargetReference + opt_ map[string]interface{} +} + +// SetTarget: Changes target url for forwarding rule. +func (r *ForwardingRulesService) SetTarget(project string, region string, forwardingRule string, targetreference *TargetReference) *ForwardingRulesSetTargetCall { + c := &ForwardingRulesSetTargetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.forwardingRule = forwardingRule + c.targetreference = targetreference + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *ForwardingRulesSetTargetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ForwardingRulesSetTargetCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "forwardingRule": c.forwardingRule, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes target url for forwarding rule.", + // "httpMethod": "POST", + // "id": "compute.forwardingRules.setTarget", + // "parameterOrder": [ + // "project", + // "region", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource in which target is to be set.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/forwardingRules/{forwardingRule}/setTarget", + // "request": { + // "$ref": "TargetReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalAddresses.delete": + +type GlobalAddressesDeleteCall struct { + s *Service + project string + address string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified address resource. +func (r *GlobalAddressesService) Delete(project string, address string) *GlobalAddressesDeleteCall { + c := &GlobalAddressesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalAddressesDeleteCall) Fields(s ...googleapi.Field) *GlobalAddressesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalAddressesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "address": c.address, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified address resource.", + // "httpMethod": "DELETE", + // "id": "compute.globalAddresses.delete", + // "parameterOrder": [ + // "project", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/addresses/{address}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalAddresses.get": + +type GlobalAddressesGetCall struct { + s *Service + project string + address string + opt_ map[string]interface{} +} + +// Get: Returns the specified address resource. +func (r *GlobalAddressesService) Get(project string, address string) *GlobalAddressesGetCall { + c := &GlobalAddressesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalAddressesGetCall) Fields(s ...googleapi.Field) *GlobalAddressesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalAddressesGetCall) Do() (*Address, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses/{address}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "address": c.address, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Address + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified address resource.", + // "httpMethod": "GET", + // "id": "compute.globalAddresses.get", + // "parameterOrder": [ + // "project", + // "address" + // ], + // "parameters": { + // "address": { + // "description": "Name of the address resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/addresses/{address}", + // "response": { + // "$ref": "Address" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalAddresses.insert": + +type GlobalAddressesInsertCall struct { + s *Service + project string + address *Address + opt_ map[string]interface{} +} + +// Insert: Creates an address resource in the specified project using +// the data included in the request. +func (r *GlobalAddressesService) Insert(project string, address *Address) *GlobalAddressesInsertCall { + c := &GlobalAddressesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.address = address + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalAddressesInsertCall) Fields(s ...googleapi.Field) *GlobalAddressesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalAddressesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.address) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an address resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.globalAddresses.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/addresses", + // "request": { + // "$ref": "Address" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalAddresses.list": + +type GlobalAddressesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of global address resources. +func (r *GlobalAddressesService) List(project string) *GlobalAddressesListCall { + c := &GlobalAddressesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *GlobalAddressesListCall) Filter(filter string) *GlobalAddressesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *GlobalAddressesListCall) MaxResults(maxResults int64) *GlobalAddressesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *GlobalAddressesListCall) PageToken(pageToken string) *GlobalAddressesListCall { + c.opt_["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 *GlobalAddressesListCall) Fields(s ...googleapi.Field) *GlobalAddressesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalAddressesListCall) Do() (*AddressList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/addresses") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *AddressList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of global address resources.", + // "httpMethod": "GET", + // "id": "compute.globalAddresses.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/addresses", + // "response": { + // "$ref": "AddressList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalForwardingRules.delete": + +type GlobalForwardingRulesDeleteCall struct { + s *Service + project string + forwardingRule string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified ForwardingRule resource. +func (r *GlobalForwardingRulesService) Delete(project string, forwardingRule string) *GlobalForwardingRulesDeleteCall { + c := &GlobalForwardingRulesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.forwardingRule = forwardingRule + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalForwardingRulesDeleteCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalForwardingRulesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "forwardingRule": c.forwardingRule, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified ForwardingRule resource.", + // "httpMethod": "DELETE", + // "id": "compute.globalForwardingRules.delete", + // "parameterOrder": [ + // "project", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/forwardingRules/{forwardingRule}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalForwardingRules.get": + +type GlobalForwardingRulesGetCall struct { + s *Service + project string + forwardingRule string + opt_ map[string]interface{} +} + +// Get: Returns the specified ForwardingRule resource. +func (r *GlobalForwardingRulesService) Get(project string, forwardingRule string) *GlobalForwardingRulesGetCall { + c := &GlobalForwardingRulesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.forwardingRule = forwardingRule + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalForwardingRulesGetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalForwardingRulesGetCall) Do() (*ForwardingRule, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "forwardingRule": c.forwardingRule, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ForwardingRule + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified ForwardingRule resource.", + // "httpMethod": "GET", + // "id": "compute.globalForwardingRules.get", + // "parameterOrder": [ + // "project", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/forwardingRules/{forwardingRule}", + // "response": { + // "$ref": "ForwardingRule" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalForwardingRules.insert": + +type GlobalForwardingRulesInsertCall struct { + s *Service + project string + forwardingrule *ForwardingRule + opt_ map[string]interface{} +} + +// Insert: Creates a ForwardingRule resource in the specified project +// and region using the data included in the request. +func (r *GlobalForwardingRulesService) Insert(project string, forwardingrule *ForwardingRule) *GlobalForwardingRulesInsertCall { + c := &GlobalForwardingRulesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.forwardingrule = forwardingrule + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalForwardingRulesInsertCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalForwardingRulesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.forwardingrule) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a ForwardingRule resource in the specified project and region using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.globalForwardingRules.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/forwardingRules", + // "request": { + // "$ref": "ForwardingRule" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalForwardingRules.list": + +type GlobalForwardingRulesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of ForwardingRule resources available to the +// specified project. +func (r *GlobalForwardingRulesService) List(project string) *GlobalForwardingRulesListCall { + c := &GlobalForwardingRulesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *GlobalForwardingRulesListCall) Filter(filter string) *GlobalForwardingRulesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *GlobalForwardingRulesListCall) MaxResults(maxResults int64) *GlobalForwardingRulesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *GlobalForwardingRulesListCall) PageToken(pageToken string) *GlobalForwardingRulesListCall { + c.opt_["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 *GlobalForwardingRulesListCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalForwardingRulesListCall) Do() (*ForwardingRuleList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ForwardingRuleList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of ForwardingRule resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.globalForwardingRules.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/forwardingRules", + // "response": { + // "$ref": "ForwardingRuleList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalForwardingRules.setTarget": + +type GlobalForwardingRulesSetTargetCall struct { + s *Service + project string + forwardingRule string + targetreference *TargetReference + opt_ map[string]interface{} +} + +// SetTarget: Changes target url for forwarding rule. +func (r *GlobalForwardingRulesService) SetTarget(project string, forwardingRule string, targetreference *TargetReference) *GlobalForwardingRulesSetTargetCall { + c := &GlobalForwardingRulesSetTargetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.forwardingRule = forwardingRule + c.targetreference = targetreference + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalForwardingRulesSetTargetCall) Fields(s ...googleapi.Field) *GlobalForwardingRulesSetTargetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalForwardingRulesSetTargetCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/forwardingRules/{forwardingRule}/setTarget") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "forwardingRule": c.forwardingRule, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes target url for forwarding rule.", + // "httpMethod": "POST", + // "id": "compute.globalForwardingRules.setTarget", + // "parameterOrder": [ + // "project", + // "forwardingRule" + // ], + // "parameters": { + // "forwardingRule": { + // "description": "Name of the ForwardingRule resource in which target is to be set.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/forwardingRules/{forwardingRule}/setTarget", + // "request": { + // "$ref": "TargetReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalOperations.aggregatedList": + +type GlobalOperationsAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of all operations grouped by +// scope. +func (r *GlobalOperationsService) AggregatedList(project string) *GlobalOperationsAggregatedListCall { + c := &GlobalOperationsAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *GlobalOperationsAggregatedListCall) Filter(filter string) *GlobalOperationsAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *GlobalOperationsAggregatedListCall) MaxResults(maxResults int64) *GlobalOperationsAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *GlobalOperationsAggregatedListCall) PageToken(pageToken string) *GlobalOperationsAggregatedListCall { + c.opt_["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 *GlobalOperationsAggregatedListCall) Fields(s ...googleapi.Field) *GlobalOperationsAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalOperationsAggregatedListCall) Do() (*OperationAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *OperationAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of all operations grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.globalOperations.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/operations", + // "response": { + // "$ref": "OperationAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalOperations.delete": + +type GlobalOperationsDeleteCall struct { + s *Service + project string + operation string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified operation resource. +func (r *GlobalOperationsService) Delete(project string, operation string) *GlobalOperationsDeleteCall { + c := &GlobalOperationsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.operation = operation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalOperationsDeleteCall) Fields(s ...googleapi.Field) *GlobalOperationsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalOperationsDeleteCall) Do() error { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "operation": c.operation, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes the specified operation resource.", + // "httpMethod": "DELETE", + // "id": "compute.globalOperations.delete", + // "parameterOrder": [ + // "project", + // "operation" + // ], + // "parameters": { + // "operation": { + // "description": "Name of the operation resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/operations/{operation}", + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.globalOperations.get": + +type GlobalOperationsGetCall struct { + s *Service + project string + operation string + opt_ map[string]interface{} +} + +// Get: Retrieves the specified operation resource. +func (r *GlobalOperationsService) Get(project string, operation string) *GlobalOperationsGetCall { + c := &GlobalOperationsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.operation = operation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *GlobalOperationsGetCall) Fields(s ...googleapi.Field) *GlobalOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalOperationsGetCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations/{operation}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "operation": c.operation, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the specified operation resource.", + // "httpMethod": "GET", + // "id": "compute.globalOperations.get", + // "parameterOrder": [ + // "project", + // "operation" + // ], + // "parameters": { + // "operation": { + // "description": "Name of the operation resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/operations/{operation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.globalOperations.list": + +type GlobalOperationsListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of operation resources contained within the +// specified project. +func (r *GlobalOperationsService) List(project string) *GlobalOperationsListCall { + c := &GlobalOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *GlobalOperationsListCall) Filter(filter string) *GlobalOperationsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *GlobalOperationsListCall) MaxResults(maxResults int64) *GlobalOperationsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *GlobalOperationsListCall) PageToken(pageToken string) *GlobalOperationsListCall { + c.opt_["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 *GlobalOperationsListCall) Fields(s ...googleapi.Field) *GlobalOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *GlobalOperationsListCall) Do() (*OperationList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *OperationList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of operation resources contained within the specified project.", + // "httpMethod": "GET", + // "id": "compute.globalOperations.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/operations", + // "response": { + // "$ref": "OperationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.httpHealthChecks.delete": + +type HttpHealthChecksDeleteCall struct { + s *Service + project string + httpHealthCheck string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified HttpHealthCheck resource. +func (r *HttpHealthChecksService) Delete(project string, httpHealthCheck string) *HttpHealthChecksDeleteCall { + c := &HttpHealthChecksDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.httpHealthCheck = httpHealthCheck + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HttpHealthChecksDeleteCall) Fields(s ...googleapi.Field) *HttpHealthChecksDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *HttpHealthChecksDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified HttpHealthCheck resource.", + // "httpMethod": "DELETE", + // "id": "compute.httpHealthChecks.delete", + // "parameterOrder": [ + // "project", + // "httpHealthCheck" + // ], + // "parameters": { + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.httpHealthChecks.get": + +type HttpHealthChecksGetCall struct { + s *Service + project string + httpHealthCheck string + opt_ map[string]interface{} +} + +// Get: Returns the specified HttpHealthCheck resource. +func (r *HttpHealthChecksService) Get(project string, httpHealthCheck string) *HttpHealthChecksGetCall { + c := &HttpHealthChecksGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.httpHealthCheck = httpHealthCheck + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HttpHealthChecksGetCall) Fields(s ...googleapi.Field) *HttpHealthChecksGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *HttpHealthChecksGetCall) Do() (*HttpHealthCheck, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *HttpHealthCheck + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified HttpHealthCheck resource.", + // "httpMethod": "GET", + // "id": "compute.httpHealthChecks.get", + // "parameterOrder": [ + // "project", + // "httpHealthCheck" + // ], + // "parameters": { + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + // "response": { + // "$ref": "HttpHealthCheck" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.httpHealthChecks.insert": + +type HttpHealthChecksInsertCall struct { + s *Service + project string + httphealthcheck *HttpHealthCheck + opt_ map[string]interface{} +} + +// Insert: Creates a HttpHealthCheck resource in the specified project +// using the data included in the request. +func (r *HttpHealthChecksService) Insert(project string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksInsertCall { + c := &HttpHealthChecksInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.httphealthcheck = httphealthcheck + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HttpHealthChecksInsertCall) Fields(s ...googleapi.Field) *HttpHealthChecksInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *HttpHealthChecksInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.httpHealthChecks.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/httpHealthChecks", + // "request": { + // "$ref": "HttpHealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.httpHealthChecks.list": + +type HttpHealthChecksListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of HttpHealthCheck resources available to +// the specified project. +func (r *HttpHealthChecksService) List(project string) *HttpHealthChecksListCall { + c := &HttpHealthChecksListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *HttpHealthChecksListCall) Filter(filter string) *HttpHealthChecksListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *HttpHealthChecksListCall) MaxResults(maxResults int64) *HttpHealthChecksListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *HttpHealthChecksListCall) PageToken(pageToken string) *HttpHealthChecksListCall { + c.opt_["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 *HttpHealthChecksListCall) Fields(s ...googleapi.Field) *HttpHealthChecksListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *HttpHealthChecksListCall) Do() (*HttpHealthCheckList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *HttpHealthCheckList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of HttpHealthCheck resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.httpHealthChecks.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/httpHealthChecks", + // "response": { + // "$ref": "HttpHealthCheckList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.httpHealthChecks.patch": + +type HttpHealthChecksPatchCall struct { + s *Service + project string + httpHealthCheck string + httphealthcheck *HttpHealthCheck + opt_ map[string]interface{} +} + +// Patch: Updates a HttpHealthCheck resource in the specified project +// using the data included in the request. This method supports patch +// semantics. +func (r *HttpHealthChecksService) Patch(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksPatchCall { + c := &HttpHealthChecksPatchCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.httpHealthCheck = httpHealthCheck + c.httphealthcheck = httphealthcheck + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HttpHealthChecksPatchCall) Fields(s ...googleapi.Field) *HttpHealthChecksPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *HttpHealthChecksPatchCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "compute.httpHealthChecks.patch", + // "parameterOrder": [ + // "project", + // "httpHealthCheck" + // ], + // "parameters": { + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + // "request": { + // "$ref": "HttpHealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.httpHealthChecks.update": + +type HttpHealthChecksUpdateCall struct { + s *Service + project string + httpHealthCheck string + httphealthcheck *HttpHealthCheck + opt_ map[string]interface{} +} + +// Update: Updates a HttpHealthCheck resource in the specified project +// using the data included in the request. +func (r *HttpHealthChecksService) Update(project string, httpHealthCheck string, httphealthcheck *HttpHealthCheck) *HttpHealthChecksUpdateCall { + c := &HttpHealthChecksUpdateCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.httpHealthCheck = httpHealthCheck + c.httphealthcheck = httphealthcheck + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *HttpHealthChecksUpdateCall) Fields(s ...googleapi.Field) *HttpHealthChecksUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *HttpHealthChecksUpdateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.httphealthcheck) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/httpHealthChecks/{httpHealthCheck}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PUT", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "httpHealthCheck": c.httpHealthCheck, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Updates a HttpHealthCheck resource in the specified project using the data included in the request.", + // "httpMethod": "PUT", + // "id": "compute.httpHealthChecks.update", + // "parameterOrder": [ + // "project", + // "httpHealthCheck" + // ], + // "parameters": { + // "httpHealthCheck": { + // "description": "Name of the HttpHealthCheck resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/httpHealthChecks/{httpHealthCheck}", + // "request": { + // "$ref": "HttpHealthCheck" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.images.delete": + +type ImagesDeleteCall struct { + s *Service + project string + image string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified image resource. +func (r *ImagesService) Delete(project string, image string) *ImagesDeleteCall { + c := &ImagesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.image = image + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ImagesDeleteCall) Fields(s ...googleapi.Field) *ImagesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ImagesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "image": c.image, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified image resource.", + // "httpMethod": "DELETE", + // "id": "compute.images.delete", + // "parameterOrder": [ + // "project", + // "image" + // ], + // "parameters": { + // "image": { + // "description": "Name of the image resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/images/{image}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.images.deprecate": + +type ImagesDeprecateCall struct { + s *Service + project string + image string + deprecationstatus *DeprecationStatus + opt_ map[string]interface{} +} + +// Deprecate: Sets the deprecation status of an image. If no message +// body is given, clears the deprecation status instead. +func (r *ImagesService) Deprecate(project string, image string, deprecationstatus *DeprecationStatus) *ImagesDeprecateCall { + c := &ImagesDeprecateCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.image = image + c.deprecationstatus = deprecationstatus + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ImagesDeprecateCall) Fields(s ...googleapi.Field) *ImagesDeprecateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ImagesDeprecateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.deprecationstatus) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}/deprecate") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "image": c.image, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.", + // "httpMethod": "POST", + // "id": "compute.images.deprecate", + // "parameterOrder": [ + // "project", + // "image" + // ], + // "parameters": { + // "image": { + // "description": "Image name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/images/{image}/deprecate", + // "request": { + // "$ref": "DeprecationStatus" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.images.get": + +type ImagesGetCall struct { + s *Service + project string + image string + opt_ map[string]interface{} +} + +// Get: Returns the specified image resource. +func (r *ImagesService) Get(project string, image string) *ImagesGetCall { + c := &ImagesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.image = image + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ImagesGetCall) Fields(s ...googleapi.Field) *ImagesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ImagesGetCall) Do() (*Image, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images/{image}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "image": c.image, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Image + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified image resource.", + // "httpMethod": "GET", + // "id": "compute.images.get", + // "parameterOrder": [ + // "project", + // "image" + // ], + // "parameters": { + // "image": { + // "description": "Name of the image resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/images/{image}", + // "response": { + // "$ref": "Image" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.images.insert": + +type ImagesInsertCall struct { + s *Service + project string + image *Image + opt_ map[string]interface{} +} + +// Insert: Creates an image resource in the specified project using the +// data included in the request. +func (r *ImagesService) Insert(project string, image *Image) *ImagesInsertCall { + c := &ImagesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.image = image + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ImagesInsertCall) Fields(s ...googleapi.Field) *ImagesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ImagesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.image) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an image resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.images.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/images", + // "request": { + // "$ref": "Image" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/devstorage.full_control", + // "https://www.googleapis.com/auth/devstorage.read_only", + // "https://www.googleapis.com/auth/devstorage.read_write" + // ] + // } + +} + +// method id "compute.images.list": + +type ImagesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of image resources available to the +// specified project. +func (r *ImagesService) List(project string) *ImagesListCall { + c := &ImagesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *ImagesListCall) Filter(filter string) *ImagesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *ImagesListCall) MaxResults(maxResults int64) *ImagesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *ImagesListCall) PageToken(pageToken string) *ImagesListCall { + c.opt_["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 *ImagesListCall) Fields(s ...googleapi.Field) *ImagesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ImagesListCall) Do() (*ImageList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/images") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ImageList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of image resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.images.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/images", + // "response": { + // "$ref": "ImageList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instanceTemplates.delete": + +type InstanceTemplatesDeleteCall struct { + s *Service + project string + instanceTemplate string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified instance template resource. +func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { + c := &InstanceTemplatesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.instanceTemplate = instanceTemplate + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "instanceTemplate": c.instanceTemplate, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified instance template resource.", + // "httpMethod": "DELETE", + // "id": "compute.instanceTemplates.delete", + // "parameterOrder": [ + // "project", + // "instanceTemplate" + // ], + // "parameters": { + // "instanceTemplate": { + // "description": "Name of the instance template resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instanceTemplates.get": + +type InstanceTemplatesGetCall struct { + s *Service + project string + instanceTemplate string + opt_ map[string]interface{} +} + +// Get: Returns the specified instance template resource. +func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { + c := &InstanceTemplatesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.instanceTemplate = instanceTemplate + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesGetCall) Do() (*InstanceTemplate, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates/{instanceTemplate}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "instanceTemplate": c.instanceTemplate, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *InstanceTemplate + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified instance template resource.", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.get", + // "parameterOrder": [ + // "project", + // "instanceTemplate" + // ], + // "parameters": { + // "instanceTemplate": { + // "description": "Name of the instance template resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates/{instanceTemplate}", + // "response": { + // "$ref": "InstanceTemplate" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instanceTemplates.insert": + +type InstanceTemplatesInsertCall struct { + s *Service + project string + instancetemplate *InstanceTemplate + opt_ map[string]interface{} +} + +// Insert: Creates an instance template resource in the specified +// project using the data included in the request. +func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { + c := &InstanceTemplatesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.instancetemplate = instancetemplate + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an instance template resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.instanceTemplates.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates", + // "request": { + // "$ref": "InstanceTemplate" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instanceTemplates.list": + +type InstanceTemplatesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of instance template resources contained +// within the specified project. +func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { + c := &InstanceTemplatesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { + c.opt_["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 *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstanceTemplatesListCall) Do() (*InstanceTemplateList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/instanceTemplates") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *InstanceTemplateList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of instance template resources contained within the specified project.", + // "httpMethod": "GET", + // "id": "compute.instanceTemplates.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/instanceTemplates", + // "response": { + // "$ref": "InstanceTemplateList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instances.addAccessConfig": + +type InstancesAddAccessConfigCall struct { + s *Service + project string + zone string + instance string + networkInterface string + accessconfig *AccessConfig + opt_ map[string]interface{} +} + +// AddAccessConfig: Adds an access config to an instance's network +// interface. +func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { + c := &InstancesAddAccessConfigCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.networkInterface = networkInterface + c.accessconfig = accessconfig + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesAddAccessConfigCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + params.Set("networkInterface", fmt.Sprintf("%v", c.networkInterface)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/addAccessConfig") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds an access config to an instance's network interface.", + // "httpMethod": "POST", + // "id": "compute.instances.addAccessConfig", + // "parameterOrder": [ + // "project", + // "zone", + // "instance", + // "networkInterface" + // ], + // "parameters": { + // "instance": { + // "description": "Instance name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "networkInterface": { + // "description": "Network interface name.", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project name.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/addAccessConfig", + // "request": { + // "$ref": "AccessConfig" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.aggregatedList": + +type InstancesAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: +func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { + c := &InstancesAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { + c.opt_["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 *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesAggregatedListCall) Do() (*InstanceAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/instances") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *InstanceAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "httpMethod": "GET", + // "id": "compute.instances.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/instances", + // "response": { + // "$ref": "InstanceAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instances.attachDisk": + +type InstancesAttachDiskCall struct { + s *Service + project string + zone string + instance string + attacheddisk *AttachedDisk + opt_ map[string]interface{} +} + +// AttachDisk: Attaches a disk resource to an instance. +func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { + c := &InstancesAttachDiskCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.attacheddisk = attacheddisk + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesAttachDiskCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/attachDisk") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Attaches a disk resource to an instance.", + // "httpMethod": "POST", + // "id": "compute.instances.attachDisk", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Instance name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project name.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", + // "request": { + // "$ref": "AttachedDisk" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.delete": + +type InstancesDeleteCall struct { + s *Service + project string + zone string + instance string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified instance resource. +func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { + c := &InstancesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified instance resource.", + // "httpMethod": "DELETE", + // "id": "compute.instances.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.deleteAccessConfig": + +type InstancesDeleteAccessConfigCall struct { + s *Service + project string + zone string + instance string + accessConfig string + networkInterface string + opt_ map[string]interface{} +} + +// DeleteAccessConfig: Deletes an access config from an instance's +// network interface. +func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { + c := &InstancesDeleteAccessConfigCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.accessConfig = accessConfig + c.networkInterface = networkInterface + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesDeleteAccessConfigCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + params.Set("accessConfig", fmt.Sprintf("%v", c.accessConfig)) + params.Set("networkInterface", fmt.Sprintf("%v", c.networkInterface)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes an access config from an instance's network interface.", + // "httpMethod": "POST", + // "id": "compute.instances.deleteAccessConfig", + // "parameterOrder": [ + // "project", + // "zone", + // "instance", + // "accessConfig", + // "networkInterface" + // ], + // "parameters": { + // "accessConfig": { + // "description": "Access config name.", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "instance": { + // "description": "Instance name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "networkInterface": { + // "description": "Network interface name.", + // "location": "query", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project name.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/deleteAccessConfig", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.detachDisk": + +type InstancesDetachDiskCall struct { + s *Service + project string + zone string + instance string + deviceName string + opt_ map[string]interface{} +} + +// DetachDisk: Detaches a disk from an instance. +func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { + c := &InstancesDetachDiskCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.deviceName = deviceName + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesDetachDiskCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + params.Set("deviceName", fmt.Sprintf("%v", c.deviceName)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/detachDisk") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Detaches a disk from an instance.", + // "httpMethod": "POST", + // "id": "compute.instances.detachDisk", + // "parameterOrder": [ + // "project", + // "zone", + // "instance", + // "deviceName" + // ], + // "parameters": { + // "deviceName": { + // "description": "Disk device name to detach.", + // "location": "query", + // "pattern": "\\w[\\w.-]{0,254}", + // "required": true, + // "type": "string" + // }, + // "instance": { + // "description": "Instance name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project name.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/detachDisk", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.get": + +type InstancesGetCall struct { + s *Service + project string + zone string + instance string + opt_ map[string]interface{} +} + +// Get: Returns the specified instance resource. +func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { + c := &InstancesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesGetCall) Do() (*Instance, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Instance + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified instance resource.", + // "httpMethod": "GET", + // "id": "compute.instances.get", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}", + // "response": { + // "$ref": "Instance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instances.getSerialPortOutput": + +type InstancesGetSerialPortOutputCall struct { + s *Service + project string + zone string + instance string + opt_ map[string]interface{} +} + +// GetSerialPortOutput: Returns the specified instance's serial port +// output. +func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { + c := &InstancesGetSerialPortOutputCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesGetSerialPortOutputCall) Do() (*SerialPortOutput, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/serialPort") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *SerialPortOutput + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified instance's serial port output.", + // "httpMethod": "GET", + // "id": "compute.instances.getSerialPortOutput", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/serialPort", + // "response": { + // "$ref": "SerialPortOutput" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instances.insert": + +type InstancesInsertCall struct { + s *Service + project string + zone string + instance *Instance + opt_ map[string]interface{} +} + +// Insert: Creates an instance resource in the specified project using +// the data included in the request. +func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { + c := &InstancesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates an instance resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.instances.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances", + // "request": { + // "$ref": "Instance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.list": + +type InstancesListCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// List: Retrieves the list of instance resources contained within the +// specified zone. +func (r *InstancesService) List(project string, zone string) *InstancesListCall { + c := &InstancesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *InstancesListCall) Filter(filter string) *InstancesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { + c.opt_["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 *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesListCall) Do() (*InstanceList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *InstanceList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of instance resources contained within the specified zone.", + // "httpMethod": "GET", + // "id": "compute.instances.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances", + // "response": { + // "$ref": "InstanceList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.instances.reset": + +type InstancesResetCall struct { + s *Service + project string + zone string + instance string + opt_ map[string]interface{} +} + +// Reset: Performs a hard reset on the instance. +func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { + c := &InstancesResetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesResetCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/reset") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Performs a hard reset on the instance.", + // "httpMethod": "POST", + // "id": "compute.instances.reset", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/reset", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.setDiskAutoDelete": + +type InstancesSetDiskAutoDeleteCall struct { + s *Service + project string + zone string + instance string + autoDelete bool + deviceName string + opt_ map[string]interface{} +} + +// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to +// an instance +func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { + c := &InstancesSetDiskAutoDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.autoDelete = autoDelete + c.deviceName = deviceName + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesSetDiskAutoDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + params.Set("autoDelete", fmt.Sprintf("%v", c.autoDelete)) + params.Set("deviceName", fmt.Sprintf("%v", c.deviceName)) + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets the auto-delete flag for a disk attached to an instance", + // "httpMethod": "POST", + // "id": "compute.instances.setDiskAutoDelete", + // "parameterOrder": [ + // "project", + // "zone", + // "instance", + // "autoDelete", + // "deviceName" + // ], + // "parameters": { + // "autoDelete": { + // "description": "Whether to auto-delete the disk when the instance is deleted.", + // "location": "query", + // "required": true, + // "type": "boolean" + // }, + // "deviceName": { + // "description": "Disk device name to modify.", + // "location": "query", + // "pattern": "\\w[\\w.-]{0,254}", + // "required": true, + // "type": "string" + // }, + // "instance": { + // "description": "Instance name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project name.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.setMetadata": + +type InstancesSetMetadataCall struct { + s *Service + project string + zone string + instance string + metadata *Metadata + opt_ map[string]interface{} +} + +// SetMetadata: Sets metadata for the specified instance to the data +// included in the request. +func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { + c := &InstancesSetMetadataCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.metadata = metadata + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesSetMetadataCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setMetadata") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets metadata for the specified instance to the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.instances.setMetadata", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setMetadata", + // "request": { + // "$ref": "Metadata" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.setScheduling": + +type InstancesSetSchedulingCall struct { + s *Service + project string + zone string + instance string + scheduling *Scheduling + opt_ map[string]interface{} +} + +// SetScheduling: Sets an instance's scheduling options. +func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { + c := &InstancesSetSchedulingCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.scheduling = scheduling + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesSetSchedulingCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setScheduling") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets an instance's scheduling options.", + // "httpMethod": "POST", + // "id": "compute.instances.setScheduling", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Instance name.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Project name.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setScheduling", + // "request": { + // "$ref": "Scheduling" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.instances.setTags": + +type InstancesSetTagsCall struct { + s *Service + project string + zone string + instance string + tags *Tags + opt_ map[string]interface{} +} + +// SetTags: Sets tags for the specified instance to the data included in +// the request. +func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { + c := &InstancesSetTagsCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.instance = instance + c.tags = tags + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *InstancesSetTagsCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/instances/{instance}/setTags") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets tags for the specified instance to the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.instances.setTags", + // "parameterOrder": [ + // "project", + // "zone", + // "instance" + // ], + // "parameters": { + // "instance": { + // "description": "Name of the instance scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/instances/{instance}/setTags", + // "request": { + // "$ref": "Tags" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.licenses.get": + +type LicensesGetCall struct { + s *Service + project string + license string + opt_ map[string]interface{} +} + +// Get: Returns the specified license resource. +func (r *LicensesService) Get(project string, license string) *LicensesGetCall { + c := &LicensesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.license = license + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *LicensesGetCall) Do() (*License, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/licenses/{license}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "license": c.license, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *License + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified license resource.", + // "httpMethod": "GET", + // "id": "compute.licenses.get", + // "parameterOrder": [ + // "project", + // "license" + // ], + // "parameters": { + // "license": { + // "description": "Name of the license resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/licenses/{license}", + // "response": { + // "$ref": "License" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.machineTypes.aggregatedList": + +type MachineTypesAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of machine type resources grouped +// by scope. +func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { + c := &MachineTypesAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { + c.opt_["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 *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *MachineTypesAggregatedListCall) Do() (*MachineTypeAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/machineTypes") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *MachineTypeAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of machine type resources grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.machineTypes.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/machineTypes", + // "response": { + // "$ref": "MachineTypeAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.machineTypes.get": + +type MachineTypesGetCall struct { + s *Service + project string + zone string + machineType string + opt_ map[string]interface{} +} + +// Get: Returns the specified machine type resource. +func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { + c := &MachineTypesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.machineType = machineType + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *MachineTypesGetCall) Do() (*MachineType, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes/{machineType}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "machineType": c.machineType, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *MachineType + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified machine type resource.", + // "httpMethod": "GET", + // "id": "compute.machineTypes.get", + // "parameterOrder": [ + // "project", + // "zone", + // "machineType" + // ], + // "parameters": { + // "machineType": { + // "description": "Name of the machine type resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/machineTypes/{machineType}", + // "response": { + // "$ref": "MachineType" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.machineTypes.list": + +type MachineTypesListCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// List: Retrieves the list of machine type resources available to the +// specified project. +func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { + c := &MachineTypesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { + c.opt_["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 *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *MachineTypesListCall) Do() (*MachineTypeList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/machineTypes") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *MachineTypeList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of machine type resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.machineTypes.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/machineTypes", + // "response": { + // "$ref": "MachineTypeList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.networks.delete": + +type NetworksDeleteCall struct { + s *Service + project string + network string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified network resource. +func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { + c := &NetworksDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.network = network + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *NetworksDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "network": c.network, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified network resource.", + // "httpMethod": "DELETE", + // "id": "compute.networks.delete", + // "parameterOrder": [ + // "project", + // "network" + // ], + // "parameters": { + // "network": { + // "description": "Name of the network resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/networks/{network}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networks.get": + +type NetworksGetCall struct { + s *Service + project string + network string + opt_ map[string]interface{} +} + +// Get: Returns the specified network resource. +func (r *NetworksService) Get(project string, network string) *NetworksGetCall { + c := &NetworksGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.network = network + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *NetworksGetCall) Do() (*Network, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks/{network}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "network": c.network, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Network + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified network resource.", + // "httpMethod": "GET", + // "id": "compute.networks.get", + // "parameterOrder": [ + // "project", + // "network" + // ], + // "parameters": { + // "network": { + // "description": "Name of the network resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/networks/{network}", + // "response": { + // "$ref": "Network" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.networks.insert": + +type NetworksInsertCall struct { + s *Service + project string + network *Network + opt_ map[string]interface{} +} + +// Insert: Creates a network resource in the specified project using the +// data included in the request. +func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { + c := &NetworksInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.network = network + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *NetworksInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a network resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.networks.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/networks", + // "request": { + // "$ref": "Network" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.networks.list": + +type NetworksListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of network resources available to the +// specified project. +func (r *NetworksService) List(project string) *NetworksListCall { + c := &NetworksListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *NetworksListCall) Filter(filter string) *NetworksListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { + c.opt_["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 *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *NetworksListCall) Do() (*NetworkList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/networks") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *NetworkList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of network resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.networks.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/networks", + // "response": { + // "$ref": "NetworkList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.projects.get": + +type ProjectsGetCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// Get: Returns the specified project resource. +func (r *ProjectsService) Get(project string) *ProjectsGetCall { + c := &ProjectsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsGetCall) Do() (*Project, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Project + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified project resource.", + // "httpMethod": "GET", + // "id": "compute.projects.get", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project resource to retrieve.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}", + // "response": { + // "$ref": "Project" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.projects.setCommonInstanceMetadata": + +type ProjectsSetCommonInstanceMetadataCall struct { + s *Service + project string + metadata *Metadata + opt_ map[string]interface{} +} + +// SetCommonInstanceMetadata: Sets metadata common to all instances +// within the specified project using the data included in the request. +func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { + c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.metadata = metadata + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsSetCommonInstanceMetadataCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setCommonInstanceMetadata") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets metadata common to all instances within the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.projects.setCommonInstanceMetadata", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/setCommonInstanceMetadata", + // "request": { + // "$ref": "Metadata" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.projects.setUsageExportBucket": + +type ProjectsSetUsageExportBucketCall struct { + s *Service + project string + usageexportlocation *UsageExportLocation + opt_ map[string]interface{} +} + +// SetUsageExportBucket: Sets usage export location +func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { + c := &ProjectsSetUsageExportBucketCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.usageexportlocation = usageexportlocation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsSetUsageExportBucketCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/setUsageExportBucket") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Sets usage export location", + // "httpMethod": "POST", + // "id": "compute.projects.setUsageExportBucket", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/setUsageExportBucket", + // "request": { + // "$ref": "UsageExportLocation" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/devstorage.full_control", + // "https://www.googleapis.com/auth/devstorage.read_only", + // "https://www.googleapis.com/auth/devstorage.read_write" + // ] + // } + +} + +// method id "compute.regionOperations.delete": + +type RegionOperationsDeleteCall struct { + s *Service + project string + region string + operation string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified region-specific operation resource. +func (r *RegionOperationsService) Delete(project string, region string, operation string) *RegionOperationsDeleteCall { + c := &RegionOperationsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.operation = operation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionOperationsDeleteCall) Fields(s ...googleapi.Field) *RegionOperationsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RegionOperationsDeleteCall) Do() error { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "operation": c.operation, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes the specified region-specific operation resource.", + // "httpMethod": "DELETE", + // "id": "compute.regionOperations.delete", + // "parameterOrder": [ + // "project", + // "region", + // "operation" + // ], + // "parameters": { + // "operation": { + // "description": "Name of the operation resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/operations/{operation}", + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.regionOperations.get": + +type RegionOperationsGetCall struct { + s *Service + project string + region string + operation string + opt_ map[string]interface{} +} + +// Get: Retrieves the specified region-specific operation resource. +func (r *RegionOperationsService) Get(project string, region string, operation string) *RegionOperationsGetCall { + c := &RegionOperationsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.operation = operation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionOperationsGetCall) Fields(s ...googleapi.Field) *RegionOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RegionOperationsGetCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations/{operation}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "operation": c.operation, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the specified region-specific operation resource.", + // "httpMethod": "GET", + // "id": "compute.regionOperations.get", + // "parameterOrder": [ + // "project", + // "region", + // "operation" + // ], + // "parameters": { + // "operation": { + // "description": "Name of the operation resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/operations/{operation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regionOperations.list": + +type RegionOperationsListCall struct { + s *Service + project string + region string + opt_ map[string]interface{} +} + +// List: Retrieves the list of operation resources contained within the +// specified region. +func (r *RegionOperationsService) List(project string, region string) *RegionOperationsListCall { + c := &RegionOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *RegionOperationsListCall) Filter(filter string) *RegionOperationsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *RegionOperationsListCall) MaxResults(maxResults int64) *RegionOperationsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *RegionOperationsListCall) PageToken(pageToken string) *RegionOperationsListCall { + c.opt_["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 *RegionOperationsListCall) Fields(s ...googleapi.Field) *RegionOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RegionOperationsListCall) Do() (*OperationList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *OperationList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of operation resources contained within the specified region.", + // "httpMethod": "GET", + // "id": "compute.regionOperations.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/operations", + // "response": { + // "$ref": "OperationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regions.get": + +type RegionsGetCall struct { + s *Service + project string + region string + opt_ map[string]interface{} +} + +// Get: Returns the specified region resource. +func (r *RegionsService) Get(project string, region string) *RegionsGetCall { + c := &RegionsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RegionsGetCall) Fields(s ...googleapi.Field) *RegionsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RegionsGetCall) Do() (*Region, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Region + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified region resource.", + // "httpMethod": "GET", + // "id": "compute.regions.get", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}", + // "response": { + // "$ref": "Region" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.regions.list": + +type RegionsListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of region resources available to the +// specified project. +func (r *RegionsService) List(project string) *RegionsListCall { + c := &RegionsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *RegionsListCall) Filter(filter string) *RegionsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *RegionsListCall) MaxResults(maxResults int64) *RegionsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *RegionsListCall) PageToken(pageToken string) *RegionsListCall { + c.opt_["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 *RegionsListCall) Fields(s ...googleapi.Field) *RegionsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RegionsListCall) Do() (*RegionList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *RegionList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of region resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.regions.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions", + // "response": { + // "$ref": "RegionList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.routes.delete": + +type RoutesDeleteCall struct { + s *Service + project string + route string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified route resource. +func (r *RoutesService) Delete(project string, route string) *RoutesDeleteCall { + c := &RoutesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.route = route + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutesDeleteCall) Fields(s ...googleapi.Field) *RoutesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RoutesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "route": c.route, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified route resource.", + // "httpMethod": "DELETE", + // "id": "compute.routes.delete", + // "parameterOrder": [ + // "project", + // "route" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "route": { + // "description": "Name of the route resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/routes/{route}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.routes.get": + +type RoutesGetCall struct { + s *Service + project string + route string + opt_ map[string]interface{} +} + +// Get: Returns the specified route resource. +func (r *RoutesService) Get(project string, route string) *RoutesGetCall { + c := &RoutesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.route = route + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutesGetCall) Fields(s ...googleapi.Field) *RoutesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RoutesGetCall) Do() (*Route, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes/{route}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "route": c.route, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Route + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified route resource.", + // "httpMethod": "GET", + // "id": "compute.routes.get", + // "parameterOrder": [ + // "project", + // "route" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "route": { + // "description": "Name of the route resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/routes/{route}", + // "response": { + // "$ref": "Route" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.routes.insert": + +type RoutesInsertCall struct { + s *Service + project string + route *Route + opt_ map[string]interface{} +} + +// Insert: Creates a route resource in the specified project using the +// data included in the request. +func (r *RoutesService) Insert(project string, route *Route) *RoutesInsertCall { + c := &RoutesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.route = route + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *RoutesInsertCall) Fields(s ...googleapi.Field) *RoutesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RoutesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.route) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a route resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.routes.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/routes", + // "request": { + // "$ref": "Route" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.routes.list": + +type RoutesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of route resources available to the +// specified project. +func (r *RoutesService) List(project string) *RoutesListCall { + c := &RoutesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *RoutesListCall) Filter(filter string) *RoutesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *RoutesListCall) MaxResults(maxResults int64) *RoutesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *RoutesListCall) PageToken(pageToken string) *RoutesListCall { + c.opt_["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 *RoutesListCall) Fields(s ...googleapi.Field) *RoutesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *RoutesListCall) Do() (*RouteList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/routes") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *RouteList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of route resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.routes.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/routes", + // "response": { + // "$ref": "RouteList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.snapshots.delete": + +type SnapshotsDeleteCall struct { + s *Service + project string + snapshot string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified persistent disk snapshot resource. +func (r *SnapshotsService) Delete(project string, snapshot string) *SnapshotsDeleteCall { + c := &SnapshotsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.snapshot = snapshot + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SnapshotsDeleteCall) Fields(s ...googleapi.Field) *SnapshotsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *SnapshotsDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "snapshot": c.snapshot, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified persistent disk snapshot resource.", + // "httpMethod": "DELETE", + // "id": "compute.snapshots.delete", + // "parameterOrder": [ + // "project", + // "snapshot" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "snapshot": { + // "description": "Name of the persistent disk snapshot resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/snapshots/{snapshot}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.snapshots.get": + +type SnapshotsGetCall struct { + s *Service + project string + snapshot string + opt_ map[string]interface{} +} + +// Get: Returns the specified persistent disk snapshot resource. +func (r *SnapshotsService) Get(project string, snapshot string) *SnapshotsGetCall { + c := &SnapshotsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.snapshot = snapshot + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *SnapshotsGetCall) Fields(s ...googleapi.Field) *SnapshotsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *SnapshotsGetCall) Do() (*Snapshot, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots/{snapshot}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "snapshot": c.snapshot, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Snapshot + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified persistent disk snapshot resource.", + // "httpMethod": "GET", + // "id": "compute.snapshots.get", + // "parameterOrder": [ + // "project", + // "snapshot" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "snapshot": { + // "description": "Name of the persistent disk snapshot resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/snapshots/{snapshot}", + // "response": { + // "$ref": "Snapshot" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.snapshots.list": + +type SnapshotsListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of persistent disk snapshot resources +// contained within the specified project. +func (r *SnapshotsService) List(project string) *SnapshotsListCall { + c := &SnapshotsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *SnapshotsListCall) Filter(filter string) *SnapshotsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *SnapshotsListCall) MaxResults(maxResults int64) *SnapshotsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *SnapshotsListCall) PageToken(pageToken string) *SnapshotsListCall { + c.opt_["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 *SnapshotsListCall) Fields(s ...googleapi.Field) *SnapshotsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *SnapshotsListCall) Do() (*SnapshotList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/snapshots") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *SnapshotList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of persistent disk snapshot resources contained within the specified project.", + // "httpMethod": "GET", + // "id": "compute.snapshots.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/snapshots", + // "response": { + // "$ref": "SnapshotList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetHttpProxies.delete": + +type TargetHttpProxiesDeleteCall struct { + s *Service + project string + targetHttpProxy string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified TargetHttpProxy resource. +func (r *TargetHttpProxiesService) Delete(project string, targetHttpProxy string) *TargetHttpProxiesDeleteCall { + c := &TargetHttpProxiesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.targetHttpProxy = targetHttpProxy + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetHttpProxiesDeleteCall) Fields(s ...googleapi.Field) *TargetHttpProxiesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetHttpProxiesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "targetHttpProxy": c.targetHttpProxy, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified TargetHttpProxy resource.", + // "httpMethod": "DELETE", + // "id": "compute.targetHttpProxies.delete", + // "parameterOrder": [ + // "project", + // "targetHttpProxy" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "targetHttpProxy": { + // "description": "Name of the TargetHttpProxy resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetHttpProxies.get": + +type TargetHttpProxiesGetCall struct { + s *Service + project string + targetHttpProxy string + opt_ map[string]interface{} +} + +// Get: Returns the specified TargetHttpProxy resource. +func (r *TargetHttpProxiesService) Get(project string, targetHttpProxy string) *TargetHttpProxiesGetCall { + c := &TargetHttpProxiesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.targetHttpProxy = targetHttpProxy + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetHttpProxiesGetCall) Fields(s ...googleapi.Field) *TargetHttpProxiesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetHttpProxiesGetCall) Do() (*TargetHttpProxy, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies/{targetHttpProxy}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "targetHttpProxy": c.targetHttpProxy, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetHttpProxy + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified TargetHttpProxy resource.", + // "httpMethod": "GET", + // "id": "compute.targetHttpProxies.get", + // "parameterOrder": [ + // "project", + // "targetHttpProxy" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "targetHttpProxy": { + // "description": "Name of the TargetHttpProxy resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/targetHttpProxies/{targetHttpProxy}", + // "response": { + // "$ref": "TargetHttpProxy" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetHttpProxies.insert": + +type TargetHttpProxiesInsertCall struct { + s *Service + project string + targethttpproxy *TargetHttpProxy + opt_ map[string]interface{} +} + +// Insert: Creates a TargetHttpProxy resource in the specified project +// using the data included in the request. +func (r *TargetHttpProxiesService) Insert(project string, targethttpproxy *TargetHttpProxy) *TargetHttpProxiesInsertCall { + c := &TargetHttpProxiesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.targethttpproxy = targethttpproxy + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetHttpProxiesInsertCall) Fields(s ...googleapi.Field) *TargetHttpProxiesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetHttpProxiesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targethttpproxy) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a TargetHttpProxy resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.targetHttpProxies.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/targetHttpProxies", + // "request": { + // "$ref": "TargetHttpProxy" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetHttpProxies.list": + +type TargetHttpProxiesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of TargetHttpProxy resources available to +// the specified project. +func (r *TargetHttpProxiesService) List(project string) *TargetHttpProxiesListCall { + c := &TargetHttpProxiesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *TargetHttpProxiesListCall) Filter(filter string) *TargetHttpProxiesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *TargetHttpProxiesListCall) MaxResults(maxResults int64) *TargetHttpProxiesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *TargetHttpProxiesListCall) PageToken(pageToken string) *TargetHttpProxiesListCall { + c.opt_["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 *TargetHttpProxiesListCall) Fields(s ...googleapi.Field) *TargetHttpProxiesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetHttpProxiesListCall) Do() (*TargetHttpProxyList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/targetHttpProxies") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetHttpProxyList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of TargetHttpProxy resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.targetHttpProxies.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/targetHttpProxies", + // "response": { + // "$ref": "TargetHttpProxyList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetHttpProxies.setUrlMap": + +type TargetHttpProxiesSetUrlMapCall struct { + s *Service + project string + targetHttpProxy string + urlmapreference *UrlMapReference + opt_ map[string]interface{} +} + +// SetUrlMap: Changes the URL map for TargetHttpProxy. +func (r *TargetHttpProxiesService) SetUrlMap(project string, targetHttpProxy string, urlmapreference *UrlMapReference) *TargetHttpProxiesSetUrlMapCall { + c := &TargetHttpProxiesSetUrlMapCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.targetHttpProxy = targetHttpProxy + c.urlmapreference = urlmapreference + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetHttpProxiesSetUrlMapCall) Fields(s ...googleapi.Field) *TargetHttpProxiesSetUrlMapCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetHttpProxiesSetUrlMapCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapreference) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "targetHttpProxy": c.targetHttpProxy, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes the URL map for TargetHttpProxy.", + // "httpMethod": "POST", + // "id": "compute.targetHttpProxies.setUrlMap", + // "parameterOrder": [ + // "project", + // "targetHttpProxy" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "targetHttpProxy": { + // "description": "Name of the TargetHttpProxy resource whose URL map is to be set.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/targetHttpProxies/{targetHttpProxy}/setUrlMap", + // "request": { + // "$ref": "UrlMapReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetInstances.aggregatedList": + +type TargetInstancesAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of target instances grouped by +// scope. +func (r *TargetInstancesService) AggregatedList(project string) *TargetInstancesAggregatedListCall { + c := &TargetInstancesAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *TargetInstancesAggregatedListCall) Filter(filter string) *TargetInstancesAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *TargetInstancesAggregatedListCall) MaxResults(maxResults int64) *TargetInstancesAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *TargetInstancesAggregatedListCall) PageToken(pageToken string) *TargetInstancesAggregatedListCall { + c.opt_["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 *TargetInstancesAggregatedListCall) Fields(s ...googleapi.Field) *TargetInstancesAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetInstancesAggregatedListCall) Do() (*TargetInstanceAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetInstances") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetInstanceAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of target instances grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.targetInstances.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/targetInstances", + // "response": { + // "$ref": "TargetInstanceAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetInstances.delete": + +type TargetInstancesDeleteCall struct { + s *Service + project string + zone string + targetInstance string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified TargetInstance resource. +func (r *TargetInstancesService) Delete(project string, zone string, targetInstance string) *TargetInstancesDeleteCall { + c := &TargetInstancesDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.targetInstance = targetInstance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetInstancesDeleteCall) Fields(s ...googleapi.Field) *TargetInstancesDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetInstancesDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "targetInstance": c.targetInstance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified TargetInstance resource.", + // "httpMethod": "DELETE", + // "id": "compute.targetInstances.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "targetInstance" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "targetInstance": { + // "description": "Name of the TargetInstance resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetInstances.get": + +type TargetInstancesGetCall struct { + s *Service + project string + zone string + targetInstance string + opt_ map[string]interface{} +} + +// Get: Returns the specified TargetInstance resource. +func (r *TargetInstancesService) Get(project string, zone string, targetInstance string) *TargetInstancesGetCall { + c := &TargetInstancesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.targetInstance = targetInstance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetInstancesGetCall) Fields(s ...googleapi.Field) *TargetInstancesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetInstancesGetCall) Do() (*TargetInstance, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances/{targetInstance}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "targetInstance": c.targetInstance, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetInstance + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified TargetInstance resource.", + // "httpMethod": "GET", + // "id": "compute.targetInstances.get", + // "parameterOrder": [ + // "project", + // "zone", + // "targetInstance" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "targetInstance": { + // "description": "Name of the TargetInstance resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/targetInstances/{targetInstance}", + // "response": { + // "$ref": "TargetInstance" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetInstances.insert": + +type TargetInstancesInsertCall struct { + s *Service + project string + zone string + targetinstance *TargetInstance + opt_ map[string]interface{} +} + +// Insert: Creates a TargetInstance resource in the specified project +// and zone using the data included in the request. +func (r *TargetInstancesService) Insert(project string, zone string, targetinstance *TargetInstance) *TargetInstancesInsertCall { + c := &TargetInstancesInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.targetinstance = targetinstance + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetInstancesInsertCall) Fields(s ...googleapi.Field) *TargetInstancesInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetInstancesInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetinstance) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a TargetInstance resource in the specified project and zone using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.targetInstances.insert", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/targetInstances", + // "request": { + // "$ref": "TargetInstance" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetInstances.list": + +type TargetInstancesListCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// List: Retrieves the list of TargetInstance resources available to the +// specified project and zone. +func (r *TargetInstancesService) List(project string, zone string) *TargetInstancesListCall { + c := &TargetInstancesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *TargetInstancesListCall) Filter(filter string) *TargetInstancesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *TargetInstancesListCall) MaxResults(maxResults int64) *TargetInstancesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *TargetInstancesListCall) PageToken(pageToken string) *TargetInstancesListCall { + c.opt_["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 *TargetInstancesListCall) Fields(s ...googleapi.Field) *TargetInstancesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetInstancesListCall) Do() (*TargetInstanceList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/targetInstances") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetInstanceList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of TargetInstance resources available to the specified project and zone.", + // "httpMethod": "GET", + // "id": "compute.targetInstances.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/targetInstances", + // "response": { + // "$ref": "TargetInstanceList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetPools.addHealthCheck": + +type TargetPoolsAddHealthCheckCall struct { + s *Service + project string + region string + targetPool string + targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest + opt_ map[string]interface{} +} + +// AddHealthCheck: Adds health check URL to targetPool. +func (r *TargetPoolsService) AddHealthCheck(project string, region string, targetPool string, targetpoolsaddhealthcheckrequest *TargetPoolsAddHealthCheckRequest) *TargetPoolsAddHealthCheckCall { + c := &TargetPoolsAddHealthCheckCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + c.targetpoolsaddhealthcheckrequest = targetpoolsaddhealthcheckrequest + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsAddHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsAddHealthCheckCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsAddHealthCheckCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddhealthcheckrequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds health check URL to targetPool.", + // "httpMethod": "POST", + // "id": "compute.targetPools.addHealthCheck", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which health_check_url is to be added.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}/addHealthCheck", + // "request": { + // "$ref": "TargetPoolsAddHealthCheckRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetPools.addInstance": + +type TargetPoolsAddInstanceCall struct { + s *Service + project string + region string + targetPool string + targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest + opt_ map[string]interface{} +} + +// AddInstance: Adds instance url to targetPool. +func (r *TargetPoolsService) AddInstance(project string, region string, targetPool string, targetpoolsaddinstancerequest *TargetPoolsAddInstanceRequest) *TargetPoolsAddInstanceCall { + c := &TargetPoolsAddInstanceCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + c.targetpoolsaddinstancerequest = targetpoolsaddinstancerequest + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsAddInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsAddInstanceCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsAddInstanceCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsaddinstancerequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/addInstance") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Adds instance url to targetPool.", + // "httpMethod": "POST", + // "id": "compute.targetPools.addInstance", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which instance_url is to be added.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}/addInstance", + // "request": { + // "$ref": "TargetPoolsAddInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetPools.aggregatedList": + +type TargetPoolsAggregatedListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// AggregatedList: Retrieves the list of target pools grouped by scope. +func (r *TargetPoolsService) AggregatedList(project string) *TargetPoolsAggregatedListCall { + c := &TargetPoolsAggregatedListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *TargetPoolsAggregatedListCall) Filter(filter string) *TargetPoolsAggregatedListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *TargetPoolsAggregatedListCall) MaxResults(maxResults int64) *TargetPoolsAggregatedListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *TargetPoolsAggregatedListCall) PageToken(pageToken string) *TargetPoolsAggregatedListCall { + c.opt_["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 *TargetPoolsAggregatedListCall) Fields(s ...googleapi.Field) *TargetPoolsAggregatedListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsAggregatedListCall) Do() (*TargetPoolAggregatedList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/aggregated/targetPools") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetPoolAggregatedList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of target pools grouped by scope.", + // "httpMethod": "GET", + // "id": "compute.targetPools.aggregatedList", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/aggregated/targetPools", + // "response": { + // "$ref": "TargetPoolAggregatedList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetPools.delete": + +type TargetPoolsDeleteCall struct { + s *Service + project string + region string + targetPool string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified TargetPool resource. +func (r *TargetPoolsService) Delete(project string, region string, targetPool string) *TargetPoolsDeleteCall { + c := &TargetPoolsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsDeleteCall) Fields(s ...googleapi.Field) *TargetPoolsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified TargetPool resource.", + // "httpMethod": "DELETE", + // "id": "compute.targetPools.delete", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetPools.get": + +type TargetPoolsGetCall struct { + s *Service + project string + region string + targetPool string + opt_ map[string]interface{} +} + +// Get: Returns the specified TargetPool resource. +func (r *TargetPoolsService) Get(project string, region string, targetPool string) *TargetPoolsGetCall { + c := &TargetPoolsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsGetCall) Fields(s ...googleapi.Field) *TargetPoolsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsGetCall) Do() (*TargetPool, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetPool + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified TargetPool resource.", + // "httpMethod": "GET", + // "id": "compute.targetPools.get", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}", + // "response": { + // "$ref": "TargetPool" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetPools.getHealth": + +type TargetPoolsGetHealthCall struct { + s *Service + project string + region string + targetPool string + instancereference *InstanceReference + opt_ map[string]interface{} +} + +// GetHealth: Gets the most recent health check results for each IP for +// the given instance that is referenced by given TargetPool. +func (r *TargetPoolsService) GetHealth(project string, region string, targetPool string, instancereference *InstanceReference) *TargetPoolsGetHealthCall { + c := &TargetPoolsGetHealthCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + c.instancereference = instancereference + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsGetHealthCall) Fields(s ...googleapi.Field) *TargetPoolsGetHealthCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsGetHealthCall) Do() (*TargetPoolInstanceHealth, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancereference) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/getHealth") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetPoolInstanceHealth + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the most recent health check results for each IP for the given instance that is referenced by given TargetPool.", + // "httpMethod": "POST", + // "id": "compute.targetPools.getHealth", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which the queried instance belongs.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}/getHealth", + // "request": { + // "$ref": "InstanceReference" + // }, + // "response": { + // "$ref": "TargetPoolInstanceHealth" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetPools.insert": + +type TargetPoolsInsertCall struct { + s *Service + project string + region string + targetpool *TargetPool + opt_ map[string]interface{} +} + +// Insert: Creates a TargetPool resource in the specified project and +// region using the data included in the request. +func (r *TargetPoolsService) Insert(project string, region string, targetpool *TargetPool) *TargetPoolsInsertCall { + c := &TargetPoolsInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetpool = targetpool + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsInsertCall) Fields(s ...googleapi.Field) *TargetPoolsInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpool) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a TargetPool resource in the specified project and region using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.targetPools.insert", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools", + // "request": { + // "$ref": "TargetPool" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetPools.list": + +type TargetPoolsListCall struct { + s *Service + project string + region string + opt_ map[string]interface{} +} + +// List: Retrieves the list of TargetPool resources available to the +// specified project and region. +func (r *TargetPoolsService) List(project string, region string) *TargetPoolsListCall { + c := &TargetPoolsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *TargetPoolsListCall) Filter(filter string) *TargetPoolsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *TargetPoolsListCall) MaxResults(maxResults int64) *TargetPoolsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *TargetPoolsListCall) PageToken(pageToken string) *TargetPoolsListCall { + c.opt_["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 *TargetPoolsListCall) Fields(s ...googleapi.Field) *TargetPoolsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsListCall) Do() (*TargetPoolList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *TargetPoolList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of TargetPool resources available to the specified project and region.", + // "httpMethod": "GET", + // "id": "compute.targetPools.list", + // "parameterOrder": [ + // "project", + // "region" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools", + // "response": { + // "$ref": "TargetPoolList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.targetPools.removeHealthCheck": + +type TargetPoolsRemoveHealthCheckCall struct { + s *Service + project string + region string + targetPool string + targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest + opt_ map[string]interface{} +} + +// RemoveHealthCheck: Removes health check URL from targetPool. +func (r *TargetPoolsService) RemoveHealthCheck(project string, region string, targetPool string, targetpoolsremovehealthcheckrequest *TargetPoolsRemoveHealthCheckRequest) *TargetPoolsRemoveHealthCheckCall { + c := &TargetPoolsRemoveHealthCheckCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + c.targetpoolsremovehealthcheckrequest = targetpoolsremovehealthcheckrequest + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsRemoveHealthCheckCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveHealthCheckCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsRemoveHealthCheckCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremovehealthcheckrequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Removes health check URL from targetPool.", + // "httpMethod": "POST", + // "id": "compute.targetPools.removeHealthCheck", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which health_check_url is to be removed.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeHealthCheck", + // "request": { + // "$ref": "TargetPoolsRemoveHealthCheckRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetPools.removeInstance": + +type TargetPoolsRemoveInstanceCall struct { + s *Service + project string + region string + targetPool string + targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest + opt_ map[string]interface{} +} + +// RemoveInstance: Removes instance URL from targetPool. +func (r *TargetPoolsService) RemoveInstance(project string, region string, targetPool string, targetpoolsremoveinstancerequest *TargetPoolsRemoveInstanceRequest) *TargetPoolsRemoveInstanceCall { + c := &TargetPoolsRemoveInstanceCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + c.targetpoolsremoveinstancerequest = targetpoolsremoveinstancerequest + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsRemoveInstanceCall) Fields(s ...googleapi.Field) *TargetPoolsRemoveInstanceCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsRemoveInstanceCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetpoolsremoveinstancerequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/removeInstance") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Removes instance URL from targetPool.", + // "httpMethod": "POST", + // "id": "compute.targetPools.removeInstance", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "project": { + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource to which instance_url is to be removed.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}/removeInstance", + // "request": { + // "$ref": "TargetPoolsRemoveInstanceRequest" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.targetPools.setBackup": + +type TargetPoolsSetBackupCall struct { + s *Service + project string + region string + targetPool string + targetreference *TargetReference + opt_ map[string]interface{} +} + +// SetBackup: Changes backup pool configurations. +func (r *TargetPoolsService) SetBackup(project string, region string, targetPool string, targetreference *TargetReference) *TargetPoolsSetBackupCall { + c := &TargetPoolsSetBackupCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.region = region + c.targetPool = targetPool + c.targetreference = targetreference + return c +} + +// FailoverRatio sets the optional parameter "failoverRatio": New +// failoverRatio value for the containing target pool. +func (c *TargetPoolsSetBackupCall) FailoverRatio(failoverRatio float64) *TargetPoolsSetBackupCall { + c.opt_["failoverRatio"] = failoverRatio + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *TargetPoolsSetBackupCall) Fields(s ...googleapi.Field) *TargetPoolsSetBackupCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *TargetPoolsSetBackupCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.targetreference) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["failoverRatio"]; ok { + params.Set("failoverRatio", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/regions/{region}/targetPools/{targetPool}/setBackup") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "targetPool": c.targetPool, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Changes backup pool configurations.", + // "httpMethod": "POST", + // "id": "compute.targetPools.setBackup", + // "parameterOrder": [ + // "project", + // "region", + // "targetPool" + // ], + // "parameters": { + // "failoverRatio": { + // "description": "New failoverRatio value for the containing target pool.", + // "format": "float", + // "location": "query", + // "type": "number" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "region": { + // "description": "Name of the region scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "targetPool": { + // "description": "Name of the TargetPool resource for which the backup is to be set.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/regions/{region}/targetPools/{targetPool}/setBackup", + // "request": { + // "$ref": "TargetReference" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.urlMaps.delete": + +type UrlMapsDeleteCall struct { + s *Service + project string + urlMap string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified UrlMap resource. +func (r *UrlMapsService) Delete(project string, urlMap string) *UrlMapsDeleteCall { + c := &UrlMapsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.urlMap = urlMap + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsDeleteCall) Fields(s ...googleapi.Field) *UrlMapsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "urlMap": c.urlMap, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the specified UrlMap resource.", + // "httpMethod": "DELETE", + // "id": "compute.urlMaps.delete", + // "parameterOrder": [ + // "project", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps/{urlMap}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.urlMaps.get": + +type UrlMapsGetCall struct { + s *Service + project string + urlMap string + opt_ map[string]interface{} +} + +// Get: Returns the specified UrlMap resource. +func (r *UrlMapsService) Get(project string, urlMap string) *UrlMapsGetCall { + c := &UrlMapsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.urlMap = urlMap + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsGetCall) Fields(s ...googleapi.Field) *UrlMapsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsGetCall) Do() (*UrlMap, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "urlMap": c.urlMap, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *UrlMap + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified UrlMap resource.", + // "httpMethod": "GET", + // "id": "compute.urlMaps.get", + // "parameterOrder": [ + // "project", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps/{urlMap}", + // "response": { + // "$ref": "UrlMap" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.urlMaps.insert": + +type UrlMapsInsertCall struct { + s *Service + project string + urlmap *UrlMap + opt_ map[string]interface{} +} + +// Insert: Creates a UrlMap resource in the specified project using the +// data included in the request. +func (r *UrlMapsService) Insert(project string, urlmap *UrlMap) *UrlMapsInsertCall { + c := &UrlMapsInsertCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.urlmap = urlmap + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsInsertCall) Fields(s ...googleapi.Field) *UrlMapsInsertCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsInsertCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a UrlMap resource in the specified project using the data included in the request.", + // "httpMethod": "POST", + // "id": "compute.urlMaps.insert", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps", + // "request": { + // "$ref": "UrlMap" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.urlMaps.list": + +type UrlMapsListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of UrlMap resources available to the +// specified project. +func (r *UrlMapsService) List(project string) *UrlMapsListCall { + c := &UrlMapsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *UrlMapsListCall) Filter(filter string) *UrlMapsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *UrlMapsListCall) MaxResults(maxResults int64) *UrlMapsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *UrlMapsListCall) PageToken(pageToken string) *UrlMapsListCall { + c.opt_["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 *UrlMapsListCall) Fields(s ...googleapi.Field) *UrlMapsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsListCall) Do() (*UrlMapList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *UrlMapList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of UrlMap resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.urlMaps.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps", + // "response": { + // "$ref": "UrlMapList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.urlMaps.patch": + +type UrlMapsPatchCall struct { + s *Service + project string + urlMap string + urlmap *UrlMap + opt_ map[string]interface{} +} + +// Patch: Update the entire content of the UrlMap resource. This method +// supports patch semantics. +func (r *UrlMapsService) Patch(project string, urlMap string, urlmap *UrlMap) *UrlMapsPatchCall { + c := &UrlMapsPatchCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.urlMap = urlMap + c.urlmap = urlmap + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsPatchCall) Fields(s ...googleapi.Field) *UrlMapsPatchCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsPatchCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PATCH", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "urlMap": c.urlMap, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the entire content of the UrlMap resource. This method supports patch semantics.", + // "httpMethod": "PATCH", + // "id": "compute.urlMaps.patch", + // "parameterOrder": [ + // "project", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps/{urlMap}", + // "request": { + // "$ref": "UrlMap" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.urlMaps.update": + +type UrlMapsUpdateCall struct { + s *Service + project string + urlMap string + urlmap *UrlMap + opt_ map[string]interface{} +} + +// Update: Update the entire content of the UrlMap resource. +func (r *UrlMapsService) Update(project string, urlMap string, urlmap *UrlMap) *UrlMapsUpdateCall { + c := &UrlMapsUpdateCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.urlMap = urlMap + c.urlmap = urlmap + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsUpdateCall) Fields(s ...googleapi.Field) *UrlMapsUpdateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsUpdateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmap) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("PUT", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "urlMap": c.urlMap, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Update the entire content of the UrlMap resource.", + // "httpMethod": "PUT", + // "id": "compute.urlMaps.update", + // "parameterOrder": [ + // "project", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to update.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps/{urlMap}", + // "request": { + // "$ref": "UrlMap" + // }, + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.urlMaps.validate": + +type UrlMapsValidateCall struct { + s *Service + project string + urlMap string + urlmapsvalidaterequest *UrlMapsValidateRequest + opt_ map[string]interface{} +} + +// Validate: Run static validation for the UrlMap. In particular, the +// tests of the provided UrlMap will be run. Calling this method does +// NOT create the UrlMap. +func (r *UrlMapsService) Validate(project string, urlMap string, urlmapsvalidaterequest *UrlMapsValidateRequest) *UrlMapsValidateCall { + c := &UrlMapsValidateCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.urlMap = urlMap + c.urlmapsvalidaterequest = urlmapsvalidaterequest + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *UrlMapsValidateCall) Fields(s ...googleapi.Field) *UrlMapsValidateCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *UrlMapsValidateCall) Do() (*UrlMapsValidateResponse, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.urlmapsvalidaterequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/global/urlMaps/{urlMap}/validate") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "urlMap": c.urlMap, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *UrlMapsValidateResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Run static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.", + // "httpMethod": "POST", + // "id": "compute.urlMaps.validate", + // "parameterOrder": [ + // "project", + // "urlMap" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "urlMap": { + // "description": "Name of the UrlMap resource to be validated as.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/global/urlMaps/{urlMap}/validate", + // "request": { + // "$ref": "UrlMapsValidateRequest" + // }, + // "response": { + // "$ref": "UrlMapsValidateResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.zoneOperations.delete": + +type ZoneOperationsDeleteCall struct { + s *Service + project string + zone string + operation string + opt_ map[string]interface{} +} + +// Delete: Deletes the specified zone-specific operation resource. +func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall { + c := &ZoneOperationsDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.operation = operation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneOperationsDeleteCall) Fields(s ...googleapi.Field) *ZoneOperationsDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ZoneOperationsDeleteCall) Do() error { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "operation": c.operation, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return err + } + return nil + // { + // "description": "Deletes the specified zone-specific operation resource.", + // "httpMethod": "DELETE", + // "id": "compute.zoneOperations.delete", + // "parameterOrder": [ + // "project", + // "zone", + // "operation" + // ], + // "parameters": { + // "operation": { + // "description": "Name of the operation resource to delete.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/operations/{operation}", + // "scopes": [ + // "https://www.googleapis.com/auth/compute" + // ] + // } + +} + +// method id "compute.zoneOperations.get": + +type ZoneOperationsGetCall struct { + s *Service + project string + zone string + operation string + opt_ map[string]interface{} +} + +// Get: Retrieves the specified zone-specific operation resource. +func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall { + c := &ZoneOperationsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + c.operation = operation + return c +} + +// Fields allows partial responses to be retrieved. +// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse +// for more information. +func (c *ZoneOperationsGetCall) Fields(s ...googleapi.Field) *ZoneOperationsGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ZoneOperationsGetCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations/{operation}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "operation": c.operation, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the specified zone-specific operation resource.", + // "httpMethod": "GET", + // "id": "compute.zoneOperations.get", + // "parameterOrder": [ + // "project", + // "zone", + // "operation" + // ], + // "parameters": { + // "operation": { + // "description": "Name of the operation resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/operations/{operation}", + // "response": { + // "$ref": "Operation" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.zoneOperations.list": + +type ZoneOperationsListCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// List: Retrieves the list of operation resources contained within the +// specified zone. +func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall { + c := &ZoneOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.zone = zone + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall { + c.opt_["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 *ZoneOperationsListCall) Fields(s ...googleapi.Field) *ZoneOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ZoneOperationsListCall) Do() (*OperationList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *OperationList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of operation resources contained within the specified zone.", + // "httpMethod": "GET", + // "id": "compute.zoneOperations.list", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone scoping this request.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}/operations", + // "response": { + // "$ref": "OperationList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.zones.get": + +type ZonesGetCall struct { + s *Service + project string + zone string + opt_ map[string]interface{} +} + +// Get: Returns the specified zone resource. +func (r *ZonesService) Get(project string, zone string) *ZonesGetCall { + c := &ZonesGetCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + c.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 *ZonesGetCall) Fields(s ...googleapi.Field) *ZonesGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ZonesGetCall) Do() (*Zone, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones/{zone}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Zone + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Returns the specified zone resource.", + // "httpMethod": "GET", + // "id": "compute.zones.get", + // "parameterOrder": [ + // "project", + // "zone" + // ], + // "parameters": { + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // }, + // "zone": { + // "description": "Name of the zone resource to return.", + // "location": "path", + // "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones/{zone}", + // "response": { + // "$ref": "Zone" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} + +// method id "compute.zones.list": + +type ZonesListCall struct { + s *Service + project string + opt_ map[string]interface{} +} + +// List: Retrieves the list of zone resources available to the specified +// project. +func (r *ZonesService) List(project string) *ZonesListCall { + c := &ZonesListCall{s: r.s, opt_: make(map[string]interface{})} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": Filter expression for +// filtering listed resources. +func (c *ZonesListCall) Filter(filter string) *ZonesListCall { + c.opt_["filter"] = filter + return c +} + +// MaxResults sets the optional parameter "maxResults": Maximum count of +// results to be returned. Maximum value is 500 and default value is +// 500. +func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall { + c.opt_["maxResults"] = maxResults + return c +} + +// PageToken sets the optional parameter "pageToken": Tag returned by a +// previous list request truncated by maxResults. Used to continue a +// previous list request. +func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall { + c.opt_["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 *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ZonesListCall) Do() (*ZoneList, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["filter"]; ok { + params.Set("filter", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["maxResults"]; ok { + params.Set("maxResults", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["pageToken"]; ok { + params.Set("pageToken", fmt.Sprintf("%v", v)) + } + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{project}/zones") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ZoneList + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Retrieves the list of zone resources available to the specified project.", + // "httpMethod": "GET", + // "id": "compute.zones.list", + // "parameterOrder": [ + // "project" + // ], + // "parameters": { + // "filter": { + // "description": "Optional. Filter expression for filtering listed resources.", + // "location": "query", + // "type": "string" + // }, + // "maxResults": { + // "default": "500", + // "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + // "format": "uint32", + // "location": "query", + // "maximum": "500", + // "minimum": "0", + // "type": "integer" + // }, + // "pageToken": { + // "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + // "location": "query", + // "type": "string" + // }, + // "project": { + // "description": "Name of the project scoping this request.", + // "location": "path", + // "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{project}/zones", + // "response": { + // "$ref": "ZoneList" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/compute", + // "https://www.googleapis.com/auth/compute.readonly" + // ] + // } + +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-api.json b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-api.json new file mode 100644 index 000000000000..bca5a313cfe8 --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-api.json @@ -0,0 +1,579 @@ +{ + "kind": "discovery#restDescription", + "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/ZrZBeDfQYPqAxFURJt0IhCOLUHQ\"", + "discoveryVersion": "v1", + "id": "container:v1beta1", + "name": "container", + "version": "v1beta1", + "revision": "20141103", + "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.", + "ownerDomain": "google.com", + "ownerName": "Google", + "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", + "baseUrl": "https://www.googleapis.com/container/v1beta1/projects/", + "basePath": "/container/v1beta1/projects/", + "rootUrl": "https://www.googleapis.com/", + "servicePath": "container/v1beta1/projects/", + "batchPath": "batch", + "parameters": { + "alt": { + "type": "string", + "description": "Data format for the response.", + "default": "json", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query" + }, + "fields": { + "type": "string", + "description": "Selector specifying which fields to include in a partial response.", + "location": "query" + }, + "key": { + "type": "string", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query" + }, + "oauth_token": { + "type": "string", + "description": "OAuth 2.0 token for the current user.", + "location": "query" + }, + "prettyPrint": { + "type": "boolean", + "description": "Returns response with indentations and line breaks.", + "default": "true", + "location": "query" + }, + "quotaUser": { + "type": "string", + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.", + "location": "query" + }, + "userIp": { + "type": "string", + "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.", + "location": "query" + } + }, + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "schemas": { + "Cluster": { + "id": "Cluster", + "type": "object", + "externalTypeName": "container.v1beta1.Cluster", + "properties": { + "clusterApiVersion": { + "type": "string", + "description": "The API version of the Kubernetes master and kubelets running in this cluster. Allowed value is 0.4.2, or leave blank to pick up the latest stable release." + }, + "containerIpv4Cidr": { + "type": "string", + "description": "[Output only] The IP addresses of the container pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29)." + }, + "creationTimestamp": { + "type": "string", + "description": "[Output only] The time the cluster was created, in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional description of this cluster." + }, + "endpoint": { + "type": "string", + "description": "[Output only] The IP address of this cluster's Kubernetes master. The endpoint can be accessed from the internet at https://username:password@endpoint/.\n\nSee the masterAuth property of this resource for username and password information." + }, + "masterAuth": { + "$ref": "MasterAuth", + "description": "The HTTP basic authentication information for accessing the master. Because the master endpoint is open to the internet, you should create a strong password." + }, + "name": { + "type": "string", + "description": "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: \n- Lowercase letters, numbers, and hyphens only.\n- Must start with a letter.\n- Must end with a number or a letter." + }, + "nodeConfig": { + "$ref": "NodeConfig", + "description": "The machine type and image to use for all nodes in this cluster. See the descriptions of the child properties of nodeConfig." + }, + "nodeRoutingPrefixSize": { + "type": "integer", + "description": "[Output only] The size of the address space on each node for hosting containers.", + "format": "int32" + }, + "numNodes": { + "type": "integer", + "description": "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 plus one (to include the master). You must also have available firewall and routes quota.", + "format": "int32" + }, + "servicesIpv4Cidr": { + "type": "string", + "description": "[Output only] The IP addresses of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are always in the 10.0.0.0/16 range." + }, + "status": { + "type": "string", + "description": "[Output only] The current status of this cluster.", + "enum": [ + "error", + "provisioning", + "running", + "stopping" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "statusMessage": { + "type": "string", + "description": "[Output only] Additional information about the current status of this cluster, if available." + }, + "zone": { + "type": "string", + "description": "[Output only] The name of the Google Compute Engine zone in which the cluster resides." + } + } + }, + "CreateClusterRequest": { + "id": "CreateClusterRequest", + "type": "object", + "externalTypeName": "container.v1beta1.CreateClusterRequest", + "properties": { + "cluster": { + "$ref": "Cluster", + "description": "A cluster resource." + } + } + }, + "ListAggregatedClustersResponse": { + "id": "ListAggregatedClustersResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListAggregatedClustersResponse", + "properties": { + "clusters": { + "type": "array", + "description": "A list of clusters in the project, across all zones.", + "items": { + "$ref": "Cluster" + } + } + } + }, + "ListAggregatedOperationsResponse": { + "id": "ListAggregatedOperationsResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListAggregatedOperationsResponse", + "properties": { + "operations": { + "type": "array", + "description": "A list of operations in the project, across all zones.", + "items": { + "$ref": "Operation" + } + } + } + }, + "ListClustersResponse": { + "id": "ListClustersResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListClustersResponse", + "properties": { + "clusters": { + "type": "array", + "description": "A list of clusters in the project in the specified zone.", + "items": { + "$ref": "Cluster" + } + } + } + }, + "ListOperationsResponse": { + "id": "ListOperationsResponse", + "type": "object", + "externalTypeName": "container.v1beta1.ListOperationsResponse", + "properties": { + "operations": { + "type": "array", + "description": "A list of operations in the project in the specified zone.", + "items": { + "$ref": "Operation" + } + } + } + }, + "MasterAuth": { + "id": "MasterAuth", + "type": "object", + "externalTypeName": "container.v1beta1.MasterAuth", + "properties": { + "password": { + "type": "string", + "description": "The password to use when accessing the Kubernetes master endpoint." + }, + "user": { + "type": "string", + "description": "The username to use when accessing the Kubernetes master endpoint." + } + } + }, + "NodeConfig": { + "id": "NodeConfig", + "type": "object", + "externalTypeName": "container.v1beta1.NodeConfig", + "properties": { + "machineType": { + "type": "string", + "description": "The name of a Google Compute Engine machine type (e.g. n1-standard-1).\n\nIf unspecified, the default machine type is n1-standard-1." + }, + "sourceImage": { + "type": "string", + "description": "The fully-specified name of a Google Compute Engine image. For example: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version date).\n\nIf specifying an image, you are responsible for ensuring its compatibility with the Debian 7 backports image. We recommend leaving this field blank to accept the default backports-debian-7-wheezy value." + } + } + }, + "Operation": { + "id": "Operation", + "type": "object", + "description": "Defines the operation resource. All fields are output only.", + "externalTypeName": "container.v1beta1.Operation", + "properties": { + "errorMessage": { + "type": "string", + "description": "If an error has occurred, a textual description of the error." + }, + "name": { + "type": "string", + "description": "The server-assigned ID for this operation. If the operation is fulfilled upfront, it may not have a resource name." + }, + "operationType": { + "type": "string", + "description": "The operation type.", + "enum": [ + "createCluster", + "deleteCluster" + ], + "enumDescriptions": [ + "", + "" + ] + }, + "status": { + "type": "string", + "description": "The current status of the operation.", + "enum": [ + "done", + "pending", + "running" + ], + "enumDescriptions": [ + "", + "", + "" + ] + }, + "target": { + "type": "string", + "description": "[Optional] The URL of the cluster resource that this operation is associated with." + }, + "zone": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the operation is taking place." + } + } + } + }, + "resources": { + "projects": { + "resources": { + "clusters": { + "methods": { + "list": { + "id": "container.projects.clusters.list", + "path": "{projectId}/clusters", + "httpMethod": "GET", + "description": "Lists all clusters owned by a project across all zones.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListAggregatedClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "list": { + "id": "container.projects.operations.list", + "path": "{projectId}/operations", + "httpMethod": "GET", + "description": "Lists all operations in a project, across all zones.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId" + ], + "response": { + "$ref": "ListAggregatedOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "zones": { + "resources": { + "clusters": { + "methods": { + "create": { + "id": "container.projects.zones.clusters.create", + "path": "{projectId}/zones/{zoneId}/clusters", + "httpMethod": "POST", + "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance.\n\nThe cluster is created in the project's default network.\n\nA firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added for each node to allow the containers on that node to communicate with all other instances in the cluster.\n\nFinally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId" + ], + "request": { + "$ref": "CreateClusterRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "id": "container.projects.zones.clusters.delete", + "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + "httpMethod": "DELETE", + "description": "Deletes the cluster, including the Kubernetes master and all worker nodes.\n\nFirewalls and routes that were configured at cluster creation are also deleted.", + "parameters": { + "clusterId": { + "type": "string", + "description": "The name of the cluster to delete.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId", + "clusterId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "id": "container.projects.zones.clusters.get", + "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + "httpMethod": "GET", + "description": "Gets a specific cluster.", + "parameters": { + "clusterId": { + "type": "string", + "description": "The name of the cluster to retrieve.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId", + "clusterId" + ], + "response": { + "$ref": "Cluster" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "container.projects.zones.clusters.list", + "path": "{projectId}/zones/{zoneId}/clusters", + "httpMethod": "GET", + "description": "Lists all clusters owned by a project in the specified zone.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the cluster resides.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId" + ], + "response": { + "$ref": "ListClustersResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "get": { + "id": "container.projects.zones.operations.get", + "path": "{projectId}/zones/{zoneId}/operations/{operationId}", + "httpMethod": "GET", + "description": "Gets the specified operation.", + "parameters": { + "operationId": { + "type": "string", + "description": "The server-assigned name of the operation.", + "required": true, + "location": "path" + }, + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId", + "operationId" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "id": "container.projects.zones.operations.list", + "path": "{projectId}/zones/{zoneId}/operations", + "httpMethod": "GET", + "description": "Lists all operations in a project in a specific zone.", + "parameters": { + "projectId": { + "type": "string", + "description": "The Google Developers Console project ID or project number.", + "required": true, + "location": "path" + }, + "zoneId": { + "type": "string", + "description": "The name of the Google Compute Engine zone to return operations for.", + "required": true, + "location": "path" + } + }, + "parameterOrder": [ + "projectId", + "zoneId" + ], + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } +} diff --git a/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-gen.go b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-gen.go new file mode 100644 index 000000000000..c9fce64414bb --- /dev/null +++ b/Godeps/_workspace/src/code.google.com/p/google-api-go-client/container/v1beta1/v1beta1/container-gen.go @@ -0,0 +1,1007 @@ +// Package container provides access to the Google Container Engine API. +// +// Usage example: +// +// import "code.google.com/p/google-api-go-client/container/v1beta1" +// ... +// containerService, err := container.New(oauthHttpClient) +package container + +import ( + "bytes" + "code.google.com/p/google-api-go-client/googleapi" + "encoding/json" + "errors" + "fmt" + "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 _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace + +const apiId = "container:v1beta1" +const apiName = "container" +const apiVersion = "v1beta1" +const basePath = "https://www.googleapis.com/container/v1beta1/projects/" + +// 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 + + Projects *ProjectsService +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Clusters = NewProjectsClustersService(s) + rs.Operations = NewProjectsOperationsService(s) + rs.Zones = NewProjectsZonesService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Clusters *ProjectsClustersService + + Operations *ProjectsOperationsService + + Zones *ProjectsZonesService +} + +func NewProjectsClustersService(s *Service) *ProjectsClustersService { + rs := &ProjectsClustersService{s: s} + return rs +} + +type ProjectsClustersService struct { + s *Service +} + +func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { + rs := &ProjectsOperationsService{s: s} + return rs +} + +type ProjectsOperationsService 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} + return rs +} + +type ProjectsZonesClustersService struct { + s *Service +} + +func NewProjectsZonesOperationsService(s *Service) *ProjectsZonesOperationsService { + rs := &ProjectsZonesOperationsService{s: s} + return rs +} + +type ProjectsZonesOperationsService struct { + s *Service +} + +type Cluster struct { + // ClusterApiVersion: The API version of the Kubernetes master and + // kubelets running in this cluster. Allowed value is 0.4.2, or leave + // blank to pick up the latest stable release. + ClusterApiVersion string `json:"clusterApiVersion,omitempty"` + + // ContainerIpv4Cidr: [Output only] The IP addresses of the container + // pods in this cluster, in CIDR notation (e.g. 1.2.3.4/29). + ContainerIpv4Cidr string `json:"containerIpv4Cidr,omitempty"` + + // CreationTimestamp: [Output only] The time the cluster was created, in + // RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + + // Description: An optional description of this cluster. + Description string `json:"description,omitempty"` + + // Endpoint: [Output only] The IP address of this cluster's Kubernetes + // master. 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"` + + // MasterAuth: The HTTP basic authentication information for accessing + // the master. Because the master endpoint is open to the internet, you + // should create a strong password. + MasterAuth *MasterAuth `json:"masterAuth,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"` + + // NodeConfig: The machine type and image to use for all nodes in this + // cluster. See the descriptions of the child properties of nodeConfig. + NodeConfig *NodeConfig `json:"nodeConfig,omitempty"` + + // NodeRoutingPrefixSize: [Output only] The size of the address space on + // each node for hosting containers. + NodeRoutingPrefixSize int64 `json:"nodeRoutingPrefixSize,omitempty"` + + // NumNodes: 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 plus one (to include the master). You must also + // have available firewall and routes quota. + NumNodes int64 `json:"numNodes,omitempty"` + + // ServicesIpv4Cidr: [Output only] The IP addresses of the Kubernetes + // services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). + // Service addresses are always in the 10.0.0.0/16 range. + ServicesIpv4Cidr string `json:"servicesIpv4Cidr,omitempty"` + + // Status: [Output only] The current status of this cluster. + Status string `json:"status,omitempty"` + + // StatusMessage: [Output only] Additional information about the current + // status of this cluster, if available. + StatusMessage string `json:"statusMessage,omitempty"` + + // Zone: [Output only] The name of the Google Compute Engine zone in + // which the cluster resides. + Zone string `json:"zone,omitempty"` +} + +type CreateClusterRequest struct { + // Cluster: A cluster resource. + Cluster *Cluster `json:"cluster,omitempty"` +} + +type ListAggregatedClustersResponse struct { + // Clusters: A list of clusters in the project, across all zones. + Clusters []*Cluster `json:"clusters,omitempty"` +} + +type ListAggregatedOperationsResponse struct { + // Operations: A list of operations in the project, across all zones. + Operations []*Operation `json:"operations,omitempty"` +} + +type ListClustersResponse struct { + // Clusters: A list of clusters in the project in the specified zone. + Clusters []*Cluster `json:"clusters,omitempty"` +} + +type ListOperationsResponse struct { + // Operations: A list of operations in the project in the specified + // zone. + Operations []*Operation `json:"operations,omitempty"` +} + +type MasterAuth struct { + // Password: The password to use when accessing the Kubernetes master + // endpoint. + Password string `json:"password,omitempty"` + + // User: The username to use when accessing the Kubernetes master + // endpoint. + User string `json:"user,omitempty"` +} + +type NodeConfig struct { + // MachineType: The name of a Google Compute Engine machine type (e.g. + // n1-standard-1). + // + // If unspecified, the default machine type is + // n1-standard-1. + MachineType string `json:"machineType,omitempty"` + + // SourceImage: The fully-specified name of a Google Compute Engine + // image. For example: + // https://www.googleapis.com/compute/v1/projects/debian-cloud/global/ima + // ges/backports-debian-7-wheezy-vYYYYMMDD (where YYYMMDD is the version + // date). + // + // If specifying an image, you are responsible for ensuring its + // compatibility with the Debian 7 backports image. We recommend leaving + // this field blank to accept the default backports-debian-7-wheezy + // value. + SourceImage string `json:"sourceImage,omitempty"` +} + +type Operation struct { + // ErrorMessage: If an error has occurred, a textual description of the + // error. + ErrorMessage string `json:"errorMessage,omitempty"` + + // Name: The server-assigned ID for this operation. If the operation is + // fulfilled upfront, it may not have a resource name. + Name string `json:"name,omitempty"` + + // OperationType: The operation type. + OperationType string `json:"operationType,omitempty"` + + // Status: The current status of the operation. + Status string `json:"status,omitempty"` + + // Target: [Optional] The URL of the cluster resource that this + // operation is associated with. + Target string `json:"target,omitempty"` + + // Zone: The name of the Google Compute Engine zone in which the + // operation is taking place. + Zone string `json:"zone,omitempty"` +} + +// method id "container.projects.clusters.list": + +type ProjectsClustersListCall struct { + s *Service + projectId string + opt_ map[string]interface{} +} + +// List: Lists all clusters owned by a project across all zones. +func (r *ProjectsClustersService) List(projectId string) *ProjectsClustersListCall { + c := &ProjectsClustersListCall{s: r.s, opt_: make(map[string]interface{})} + 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 *ProjectsClustersListCall) Fields(s ...googleapi.Field) *ProjectsClustersListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsClustersListCall) Do() (*ListAggregatedClustersResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/clusters") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListAggregatedClustersResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all clusters owned by a project across all zones.", + // "httpMethod": "GET", + // "id": "container.projects.clusters.list", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/clusters", + // "response": { + // "$ref": "ListAggregatedClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.operations.list": + +type ProjectsOperationsListCall struct { + s *Service + projectId string + opt_ map[string]interface{} +} + +// List: Lists all operations in a project, across all zones. +func (r *ProjectsOperationsService) List(projectId string) *ProjectsOperationsListCall { + c := &ProjectsOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + 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 *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsOperationsListCall) Do() (*ListAggregatedOperationsResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListAggregatedOperationsResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all operations in a project, across all zones.", + // "httpMethod": "GET", + // "id": "container.projects.operations.list", + // "parameterOrder": [ + // "projectId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/operations", + // "response": { + // "$ref": "ListAggregatedOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.create": + +type ProjectsZonesClustersCreateCall struct { + s *Service + projectId string + zoneId string + createclusterrequest *CreateClusterRequest + opt_ map[string]interface{} +} + +// Create: Creates a cluster, consisting of the specified number and +// type of Google Compute Engine instances, plus a Kubernetes master +// instance. +// +// The cluster is created in the project's default +// network. +// +// A firewall is added that allows traffic into port 443 on +// the master, which enables HTTPS. A firewall and a route is added for +// each node to allow the containers on that node to communicate with +// all other instances in the cluster. +// +// Finally, a route named +// k8s-iproute-10-xx-0-0 is created to track that the cluster's +// 10.xx.0.0/16 CIDR has been assigned. +func (r *ProjectsZonesClustersService) Create(projectId string, zoneId string, createclusterrequest *CreateClusterRequest) *ProjectsZonesClustersCreateCall { + c := &ProjectsZonesClustersCreateCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + 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.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersCreateCall) Do() (*Operation, error) { + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.createclusterrequest) + if err != nil { + return nil, err + } + ctype := "application/json" + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters") + urls += "?" + params.Encode() + req, _ := http.NewRequest("POST", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + }) + req.Header.Set("Content-Type", ctype) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Creates a cluster, consisting of the specified number and type of Google Compute Engine instances, plus a Kubernetes master instance.\n\nThe cluster is created in the project's default network.\n\nA firewall is added that allows traffic into port 443 on the master, which enables HTTPS. A firewall and a route is added for each node to allow the containers on that node to communicate with all other instances in the cluster.\n\nFinally, a route named k8s-iproute-10-xx-0-0 is created to track that the cluster's 10.xx.0.0/16 CIDR has been assigned.", + // "httpMethod": "POST", + // "id": "container.projects.zones.clusters.create", + // "parameterOrder": [ + // "projectId", + // "zoneId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/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 + zoneId string + clusterId string + opt_ map[string]interface{} +} + +// Delete: Deletes the cluster, including the Kubernetes master and all +// worker nodes. +// +// Firewalls and routes that were configured at cluster +// creation are also deleted. +func (r *ProjectsZonesClustersService) Delete(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersDeleteCall { + c := &ProjectsZonesClustersDeleteCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + 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 *ProjectsZonesClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersDeleteCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersDeleteCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters/{clusterId}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("DELETE", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + "clusterId": c.clusterId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Deletes the cluster, including the Kubernetes master and all worker nodes.\n\nFirewalls and routes that were configured at cluster creation are also deleted.", + // "httpMethod": "DELETE", + // "id": "container.projects.zones.clusters.delete", + // "parameterOrder": [ + // "projectId", + // "zoneId", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to delete.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/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 + zoneId string + clusterId string + opt_ map[string]interface{} +} + +// Get: Gets a specific cluster. +func (r *ProjectsZonesClustersService) Get(projectId string, zoneId string, clusterId string) *ProjectsZonesClustersGetCall { + c := &ProjectsZonesClustersGetCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + 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 *ProjectsZonesClustersGetCall) Fields(s ...googleapi.Field) *ProjectsZonesClustersGetCall { + c.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersGetCall) Do() (*Cluster, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters/{clusterId}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + "clusterId": c.clusterId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Cluster + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets a specific cluster.", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.get", + // "parameterOrder": [ + // "projectId", + // "zoneId", + // "clusterId" + // ], + // "parameters": { + // "clusterId": { + // "description": "The name of the cluster to retrieve.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/clusters/{clusterId}", + // "response": { + // "$ref": "Cluster" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.clusters.list": + +type ProjectsZonesClustersListCall struct { + s *Service + projectId string + zoneId string + opt_ map[string]interface{} +} + +// List: Lists all clusters owned by a project in the specified zone. +func (r *ProjectsZonesClustersService) List(projectId string, zoneId string) *ProjectsZonesClustersListCall { + c := &ProjectsZonesClustersListCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + return 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.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesClustersListCall) Do() (*ListClustersResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/clusters") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListClustersResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all clusters owned by a project in the specified zone.", + // "httpMethod": "GET", + // "id": "container.projects.zones.clusters.list", + // "parameterOrder": [ + // "projectId", + // "zoneId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the cluster resides.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/clusters", + // "response": { + // "$ref": "ListClustersResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} + +// method id "container.projects.zones.operations.get": + +type ProjectsZonesOperationsGetCall struct { + s *Service + projectId string + zoneId string + operationId string + opt_ map[string]interface{} +} + +// Get: Gets the specified operation. +func (r *ProjectsZonesOperationsService) Get(projectId string, zoneId string, operationId string) *ProjectsZonesOperationsGetCall { + c := &ProjectsZonesOperationsGetCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + c.operationId = operationId + return 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.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesOperationsGetCall) Do() (*Operation, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/operations/{operationId}") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + "operationId": c.operationId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *Operation + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Gets the specified operation.", + // "httpMethod": "GET", + // "id": "container.projects.zones.operations.get", + // "parameterOrder": [ + // "projectId", + // "zoneId", + // "operationId" + // ], + // "parameters": { + // "operationId": { + // "description": "The server-assigned name of the operation.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone in which the operation resides. This is always the same zone as the cluster with which the operation is associated.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/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 + zoneId string + opt_ map[string]interface{} +} + +// List: Lists all operations in a project in a specific zone. +func (r *ProjectsZonesOperationsService) List(projectId string, zoneId string) *ProjectsZonesOperationsListCall { + c := &ProjectsZonesOperationsListCall{s: r.s, opt_: make(map[string]interface{})} + c.projectId = projectId + c.zoneId = zoneId + return 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.opt_["fields"] = googleapi.CombineFields(s) + return c +} + +func (c *ProjectsZonesOperationsListCall) Do() (*ListOperationsResponse, error) { + var body io.Reader = nil + params := make(url.Values) + params.Set("alt", "json") + if v, ok := c.opt_["fields"]; ok { + params.Set("fields", fmt.Sprintf("%v", v)) + } + urls := googleapi.ResolveRelative(c.s.BasePath, "{projectId}/zones/{zoneId}/operations") + urls += "?" + params.Encode() + req, _ := http.NewRequest("GET", urls, body) + googleapi.Expand(req.URL, map[string]string{ + "projectId": c.projectId, + "zoneId": c.zoneId, + }) + req.Header.Set("User-Agent", "google-api-go-client/0.5") + res, err := c.s.client.Do(req) + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, err + } + var ret *ListOperationsResponse + if err := json.NewDecoder(res.Body).Decode(&ret); err != nil { + return nil, err + } + return ret, nil + // { + // "description": "Lists all operations in a project in a specific zone.", + // "httpMethod": "GET", + // "id": "container.projects.zones.operations.list", + // "parameterOrder": [ + // "projectId", + // "zoneId" + // ], + // "parameters": { + // "projectId": { + // "description": "The Google Developers Console project ID or project number.", + // "location": "path", + // "required": true, + // "type": "string" + // }, + // "zoneId": { + // "description": "The name of the Google Compute Engine zone to return operations for.", + // "location": "path", + // "required": true, + // "type": "string" + // } + // }, + // "path": "{projectId}/zones/{zoneId}/operations", + // "response": { + // "$ref": "ListOperationsResponse" + // }, + // "scopes": [ + // "https://www.googleapis.com/auth/cloud-platform" + // ] + // } + +} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/conversion.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/conversion.go index 6fc3c7d239fe..2537718d1df0 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/conversion.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/conversion.go @@ -17,8 +17,10 @@ limitations under the License. package api import ( + "github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" "github.com/GoogleCloudPlatform/kubernetes/pkg/conversion" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/util" ) // Codec is the identity codec for this package - it can only convert itself @@ -27,6 +29,16 @@ var Codec = runtime.CodecFor(Scheme, "") func init() { Scheme.AddConversionFuncs( + func(in *util.Time, out *util.Time, s conversion.Scope) error { + // Cannot deep copy these, because time.Time has unexported fields. + *out = *in + return nil + }, + func(in *resource.Quantity, out *resource.Quantity, s conversion.Scope) error { + // Cannot deep copy these, because inf.Dec has unexported fields. + *out = *in.Copy() + return nil + }, // Convert ContainerManifest to BoundPod func(in *ContainerManifest, out *BoundPod, s conversion.Scope) error { out.Spec.Containers = in.Containers diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/errors.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/errors.go index 8fbcd822a50e..88df9357c6c7 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/errors.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors/errors.go @@ -102,7 +102,7 @@ func NewForbidden(kind, name string, err error) error { Kind: kind, ID: name, }, - Message: fmt.Sprintf("%s %q is forbidden", kind, name), + Message: fmt.Sprintf("%s %q is forbidden: %v", kind, name, err), }} } diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers.go index 75ceff3a7cf7..5dff4d7c02b4 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers.go @@ -18,7 +18,6 @@ package api import ( "reflect" - "strings" "github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" "github.com/GoogleCloudPlatform/kubernetes/pkg/conversion" @@ -60,27 +59,4 @@ var Semantic = conversion.EqualitiesOrDie( } return a.Amount.Cmp(b.Amount) == 0 }, - pullPoliciesEqual, ) - -// TODO: Address these per #1502 - -func IsPullAlways(p PullPolicy) bool { - return pullPoliciesEqual(p, PullAlways) -} - -func IsPullNever(p PullPolicy) bool { - return pullPoliciesEqual(p, PullNever) -} - -func IsPullIfNotPresent(p PullPolicy) bool { - // Default to pull if not present - if len(p) == 0 { - return true - } - return pullPoliciesEqual(p, PullIfNotPresent) -} - -func pullPoliciesEqual(p1, p2 PullPolicy) bool { - return strings.ToLower(string(p1)) == strings.ToLower(string(p2)) -} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers_test.go index 5d15ced93c00..c8cde624c31c 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/helpers_test.go @@ -59,8 +59,6 @@ func TestSemantic(t *testing.T) { true, }, {resource.MustParse("2m"), resource.MustParse("1m"), false}, - {PullPolicy("NEVER"), PullPolicy("neveR"), true}, - {PullPolicy("NEVER"), PullPolicy("neveRi"), false}, } for index, item := range table { diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest/latest_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest/latest_test.go index 56ae1a26e502..894043841482 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest/latest_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest/latest_test.go @@ -131,6 +131,10 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs( c.RandString(): c.RandString(), } }, + func(p *internal.PullPolicy, c fuzz.Continue) { + policies := []internal.PullPolicy{internal.PullAlways, internal.PullNever, internal.PullIfNotPresent} + *p = policies[c.Rand.Intn(len(policies))] + }, ) func TestInternalRoundTrip(t *testing.T) { diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta.go index 1b7da4d2674e..4bdfcdacd737 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta.go @@ -23,7 +23,7 @@ import ( // FillObjectMetaSystemFields populates fields that are managed by the system on ObjectMeta. func FillObjectMetaSystemFields(ctx Context, meta *ObjectMeta) { meta.CreationTimestamp = util.Now() - meta.UID = util.NewUUID().String() + meta.UID = util.NewUUID() } // HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values. diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/interfaces.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/interfaces.go index def9a269d266..17161d1e4716 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/interfaces.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/interfaces.go @@ -18,6 +18,7 @@ package meta import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/types" ) // VersionInterfaces contains the interfaces one should use for dealing with types of a particular version. @@ -31,6 +32,7 @@ type VersionInterfaces struct { // internal API objects. Attempting to set or retrieve a field on an object that does // not support that field (Name, UID, Namespace on lists) will be a no-op and return // a default value. +// TODO: rename to ObjectInterface when we clear up these interfaces. type Interface interface { TypeInterface @@ -38,8 +40,8 @@ type Interface interface { SetNamespace(namespace string) Name() string SetName(name string) - UID() string - SetUID(uid string) + UID() types.UID + SetUID(uid types.UID) ResourceVersion() string SetResourceVersion(version string) SelfLink() string @@ -51,8 +53,6 @@ type Interface interface { } // TypeInterface exposes the type and APIVersion of versioned or internal API objects. -// TODO: remove the need for this interface by refactoring runtime encoding to avoid -// needing this object. type TypeInterface interface { APIVersion() string SetAPIVersion(version string) @@ -79,8 +79,8 @@ type MetadataAccessor interface { Name(obj runtime.Object) (string, error) SetName(obj runtime.Object, name string) error - UID(obj runtime.Object) (string, error) - SetUID(obj runtime.Object, uid string) error + UID(obj runtime.Object) (types.UID, error) + SetUID(obj runtime.Object, uid types.UID) error SelfLink(obj runtime.Object) (string, error) SetSelfLink(obj runtime.Object, selfLink string) error diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta.go index e8f9e9e5c0a0..1353083474d3 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta.go @@ -22,6 +22,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/conversion" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/types" ) // Accessor takes an arbitary object pointer and returns meta.Interface. @@ -75,6 +76,9 @@ func Accessor(obj interface{}) (Interface, error) { // TypeAccessor returns an interface that allows retrieving and modifying the APIVersion // and Kind of an in-memory internal object. +// TODO: this interface is used to test code that does not have ObjectMeta or ListMeta +// in round tripping (objects which can use apiVersion/kind, but do not fit the Kube +// api conventions). func TypeAccessor(obj interface{}) (TypeInterface, error) { v, err := conversion.EnforcePtr(obj) if err != nil { @@ -174,7 +178,7 @@ func (resourceAccessor) SetName(obj runtime.Object, name string) error { return nil } -func (resourceAccessor) UID(obj runtime.Object) (string, error) { +func (resourceAccessor) UID(obj runtime.Object) (types.UID, error) { accessor, err := Accessor(obj) if err != nil { return "", err @@ -182,7 +186,7 @@ func (resourceAccessor) UID(obj runtime.Object) (string, error) { return accessor.UID(), nil } -func (resourceAccessor) SetUID(obj runtime.Object, uid string) error { +func (resourceAccessor) SetUID(obj runtime.Object, uid types.UID) error { accessor, err := Accessor(obj) if err != nil { return err @@ -264,7 +268,7 @@ func (resourceAccessor) SetResourceVersion(obj runtime.Object, version string) e type genericAccessor struct { namespace *string name *string - uid *string + uid *types.UID apiVersion *string kind *string resourceVersion *string @@ -301,14 +305,14 @@ func (a genericAccessor) SetName(name string) { *a.name = name } -func (a genericAccessor) UID() string { +func (a genericAccessor) UID() types.UID { if a.uid == nil { return "" } return *a.uid } -func (a genericAccessor) SetUID(uid string) { +func (a genericAccessor) SetUID(uid types.UID) { if a.uid == nil { return } diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta_test.go index 2309c11f365b..b357fca60d86 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/meta_test.go @@ -63,7 +63,7 @@ func TestGenericTypeMeta(t *testing.T) { if e, a := "foo", accessor.Name(); e != a { t.Errorf("expected %v, got %v", e, a) } - if e, a := "uid", accessor.UID(); e != a { + if e, a := "uid", string(accessor.UID()); e != a { t.Errorf("expected %v, got %v", e, a) } if e, a := "a", accessor.APIVersion(); e != a { @@ -79,6 +79,17 @@ func TestGenericTypeMeta(t *testing.T) { t.Errorf("expected %v, got %v", e, a) } + typeAccessor, err := TypeAccessor(&j) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + if e, a := "a", accessor.APIVersion(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := "b", accessor.Kind(); e != a { + t.Errorf("expected %v, got %v", e, a) + } + accessor.SetNamespace("baz") accessor.SetName("bar") accessor.SetUID("other") @@ -109,6 +120,15 @@ func TestGenericTypeMeta(t *testing.T) { if e, a := "google.com", j.SelfLink; e != a { t.Errorf("expected %v, got %v", e, a) } + + typeAccessor.SetAPIVersion("d") + typeAccessor.SetKind("e") + if e, a := "d", j.APIVersion; e != a { + t.Errorf("expected %v, got %v", e, a) + } + if e, a := "e", j.Kind; e != a { + t.Errorf("expected %v, got %v", e, a) + } } type InternalTypeMeta struct { @@ -162,7 +182,7 @@ func TestGenericTypeMetaAccessor(t *testing.T) { if err != nil { t.Errorf("unexpected error: %v", err) } - if e, a := "uid", uid; e != a { + if e, a := "uid", string(uid); e != a { t.Errorf("expected %v, got %v", e, a) } apiVersion, err := accessor.APIVersion(j) @@ -311,7 +331,7 @@ func TestGenericObjectMeta(t *testing.T) { if e, a := "foo", accessor.Name(); e != a { t.Errorf("expected %v, got %v", e, a) } - if e, a := "uid", accessor.UID(); e != a { + if e, a := "uid", string(accessor.UID()); e != a { t.Errorf("expected %v, got %v", e, a) } if e, a := "a", accessor.APIVersion(); e != a { @@ -403,7 +423,7 @@ func TestGenericListMeta(t *testing.T) { if e, a := "", accessor.Name(); e != a { t.Errorf("expected %v, got %v", e, a) } - if e, a := "", accessor.UID(); e != a { + if e, a := "", string(accessor.UID()); e != a { t.Errorf("expected %v, got %v", e, a) } if e, a := "a", accessor.APIVersion(); e != a { diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/restmapper_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/restmapper_test.go index 02eb507777f1..62b251111829 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/restmapper_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta/restmapper_test.go @@ -115,7 +115,7 @@ func TestKindToResource(t *testing.T) { for i, testCase := range testCases { plural, singular := kindToResource(testCase.Kind, testCase.MixedCase) if singular != testCase.Singular || plural != testCase.Plural { - t.Errorf("%d: unexpected plural and signular: %s %s", i, plural, singular) + t.Errorf("%d: unexpected plural and singular: %s %s", i, plural, singular) } } } diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/register.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/register.go index 298c62cea18f..5c138425b187 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/register.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/register.go @@ -25,9 +25,9 @@ var Scheme = runtime.NewScheme() func init() { Scheme.AddKnownTypes("", - &PodContainerInfo{}, - &PodList{}, &Pod{}, + &PodList{}, + &PodStatusResult{}, &ReplicationControllerList{}, &ReplicationController{}, &ServiceList{}, @@ -55,9 +55,9 @@ func init() { Scheme.AddKnownTypeWithName("", "ServerOpList", &OperationList{}) } -func (*PodContainerInfo) IsAnAPIObject() {} func (*Pod) IsAnAPIObject() {} func (*PodList) IsAnAPIObject() {} +func (*PodStatusResult) IsAnAPIObject() {} func (*ReplicationController) IsAnAPIObject() {} func (*ReplicationControllerList) IsAnAPIObject() {} func (*Service) IsAnAPIObject() {} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity.go index 71c89fe12af8..7ec8bf9c4cdb 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity.go @@ -18,12 +18,12 @@ package resource import ( "errors" - "flag" "fmt" "math/big" "regexp" "strings" + flag "github.com/spf13/pflag" "speter.net/go/exp/math/dec/inf" ) @@ -386,6 +386,7 @@ type qFlag struct { dest *Quantity } +// Sets the value of the internal Quantity. (used by flag & pflag) func (qf qFlag) Set(val string) error { q, err := ParseQuantity(val) if err != nil { @@ -396,10 +397,16 @@ func (qf qFlag) Set(val string) error { return nil } +// Converts the value of the internal Quantity to a string. (used by flag & pflag) func (qf qFlag) String() string { return qf.dest.String() } +// States the type of flag this is (Quantity). (used by pflag) +func (qf qFlag) Type() string { + return "quantity" +} + // QuantityFlag is a helper that makes a quantity flag (using standard flag package). // Will panic if defaultValue is not a valid quantity. func QuantityFlag(flagName, defaultValue, description string) *Quantity { diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity_test.go index 9b0ab7281b13..c550acfc6059 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource/quantity_test.go @@ -22,6 +22,7 @@ import ( "testing" fuzz "github.com/google/gofuzz" + "github.com/spf13/pflag" "speter.net/go/exp/math/dec/inf" ) @@ -487,3 +488,10 @@ func TestQFlagSet(t *testing.T) { t.Errorf("Unexpected result %v != %v", e, a) } } + +func TestQFlagIsPFlag(t *testing.T) { + var pfv pflag.Value = qFlag{} + if e, a := "quantity", pfv.Type(); e != a { + t.Errorf("Unexpected result %v != %v", e, a) + } +} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/serialization_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/serialization_test.go index c05d13b5ffec..7873819fee2d 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/serialization_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/serialization_test.go @@ -19,7 +19,6 @@ package api_test import ( "encoding/json" - "flag" "math/rand" "reflect" "strconv" @@ -37,6 +36,7 @@ import ( docker "github.com/fsouza/go-dockerclient" fuzz "github.com/google/gofuzz" + flag "github.com/spf13/pflag" "speter.net/go/exp/math/dec/inf" ) @@ -146,7 +146,6 @@ func fuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer { c.RandString(): c.RandString(), } }, - func(q *resource.Quantity, c fuzz.Continue) { // Real Quantity fuzz testing is done elsewhere; // this limited subset of functionality survives @@ -156,6 +155,10 @@ func fuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer { //q.Amount.SetScale(inf.Scale(-c.Intn(12))) q.Amount.SetUnscaled(c.Int63n(1000)) }, + func(p *api.PullPolicy, c fuzz.Continue) { + policies := []api.PullPolicy{api.PullAlways, api.PullNever, api.PullIfNotPresent} + *p = policies[c.Rand.Intn(len(policies))] + }, ) return f } @@ -163,7 +166,7 @@ func fuzzerFor(t *testing.T, version string, src rand.Source) *fuzz.Fuzzer { func fuzzInternalObject(t *testing.T, forVersion string, item runtime.Object, seed int64) runtime.Object { fuzzerFor(t, forVersion, rand.NewSource(seed)).Fuzz(item) - j, err := meta.Accessor(item) + j, err := meta.TypeAccessor(item) if err != nil { t.Fatalf("Unexpected error %v for %#v", err, item) } @@ -264,7 +267,7 @@ func TestRoundTripTypes(t *testing.T) { if err != nil { t.Fatalf("Couldn't make a %v? %v", kind, err) } - if _, err := meta.Accessor(item); err != nil { + if _, err := meta.TypeAccessor(item); err != nil { t.Fatalf("%q is not a TypeMeta and cannot be tested - add it to nonRoundTrippableTypes: %v", kind, err) } roundTripSame(t, item) diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/types.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/types.go index b30de6c32c5d..80b41de867bd 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/types.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/types.go @@ -19,6 +19,7 @@ package api import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/types" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" ) @@ -93,7 +94,7 @@ type ObjectMeta struct { // UID is the unique in time and space value for this object. It is typically generated by // the server on successful creation of a resource and is not allowed to change on PUT // operations. - UID string `json:"uid,omitempty"` + UID types.UID `json:"uid,omitempty"` // An opaque value that represents the version of this resource. May be used for optimistic // concurrency, change detection, and the watch operation on a resource or set of resources. @@ -144,18 +145,19 @@ type Volume struct { // Source represents the location and type of a volume to mount. // This is optional for now. If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. - Source *VolumeSource `json:"source"` + Source VolumeSource `json:"source,omitempty"` } -// VolumeSource represents the source location of a valume to mount. +// VolumeSource represents the source location of a volume to mount. // Only one of its members may be specified. type VolumeSource struct { - // HostDir represents a pre-existing directory on the host machine that is directly - // exposed to the container. This is generally used for system agents or other privileged - // things that are allowed to see the host machine. Most containers will NOT need this. + // HostPath represents file or directory on the host machine that is + // directly exposed to the container. This is generally used for system + // agents or other privileged things that are allowed to see the host + // machine. Most containers will NOT need this. // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not // mount host directories as read/write. - HostDir *HostDir `json:"hostDir"` + HostPath *HostPath `json:"hostPath"` // EmptyDir represents a temporary directory that shares a pod's lifetime. EmptyDir *EmptyDir `json:"emptyDir"` // GCEPersistentDisk represents a GCE Disk resource that is attached to a @@ -165,8 +167,8 @@ type VolumeSource struct { GitRepo *GitRepo `json:"gitRepo"` } -// HostDir represents bare host directory volume. -type HostDir struct { +// HostPath represents bare host directory volume. +type HostPath struct { Path string `json:"path"` } @@ -289,11 +291,11 @@ type PullPolicy string const ( // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - PullAlways PullPolicy = "PullAlways" + PullAlways PullPolicy = "Always" // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present - PullNever PullPolicy = "PullNever" + PullNever PullPolicy = "Never" // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - PullIfNotPresent PullPolicy = "PullIfNotPresent" + PullIfNotPresent PullPolicy = "IfNotPresent" ) // Container represents a single container that is expected to be run on the host. @@ -417,6 +419,7 @@ type ContainerStatus struct { type PodInfo map[string]ContainerStatus // PodContainerInfo is a wrapper for PodInfo that can be encode/decoded +// DEPRECATED: Replaced with PodStatusResult type PodContainerInfo struct { TypeMeta `json:",inline"` ObjectMeta `json:"metadata,omitempty"` @@ -502,6 +505,15 @@ type PodStatus struct { Info PodInfo `json:"info,omitempty"` } +// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded +type PodStatusResult struct { + TypeMeta `json:",inline"` + ObjectMeta `json:"metadata,omitempty"` + // Status represents the current information about a pod. This data may not be up + // to date. + Status PodStatus `json:"status,omitempty"` +} + // Pod is a collection of containers, used as either input (create, update) or as output (list, get). type Pod struct { TypeMeta `json:",inline"` @@ -1004,12 +1016,12 @@ type OperationList struct { // ObjectReference contains enough information to let you inspect or modify the referred object. type ObjectReference struct { - Kind string `json:"kind,omitempty"` - Namespace string `json:"namespace,omitempty"` - Name string `json:"name,omitempty"` - UID string `json:"uid,omitempty"` - APIVersion string `json:"apiVersion,omitempty"` - ResourceVersion string `json:"resourceVersion,omitempty"` + Kind string `json:"kind,omitempty"` + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` + UID types.UID `json:"uid,omitempty"` + APIVersion string `json:"apiVersion,omitempty"` + ResourceVersion string `json:"resourceVersion,omitempty"` // Optional. If referring to a piece of an object instead of an entire object, this string // should contain information to identify the sub-object. For example, if the object @@ -1038,18 +1050,9 @@ type Event struct { // Required. The object that this event is about. InvolvedObject ObjectReference `json:"involvedObject,omitempty"` - // Should be a short, machine understandable string that describes the current condition - // of the referred object. This should not give the reason for being in this state. - // Examples: "Running", "CantStart", "CantSchedule", "Deleted". - // It's OK for components to make up conditions to report here, but the same string should - // always be used for the same conditions. - // TODO: define a way of making sure these are consistent and don't collide. - // TODO: provide exact specification for format. - Condition string `json:"condition,omitempty"` - // Optional; this should be a short, machine understandable string that gives the reason - // for the transition into the object's current condition. For example, if ObjectCondition is - // "CantStart", StatusReason might be "ImageNotFound". + // for this event being generated. For example, if the event is reporting that a container + // can't start, the Reason might be "ImageNotFound". // TODO: provide exact specification for format. Reason string `json:"reason,omitempty"` @@ -1085,7 +1088,7 @@ type ContainerManifest struct { // TODO: UUID on Manifest is deprecated in the future once we are done // with the API refactoring. It is required for now to determine the instance // of a Pod. - UUID string `json:"uuid,omitempty"` + UUID types.UID `json:"uuid,omitempty"` Volumes []Volume `json:"volumes"` Containers []Container `json:"containers"` RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"` diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/unversioned.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/unversioned.go index 302c0eaa1a82..c1604b5612f8 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/unversioned.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/unversioned.go @@ -24,3 +24,9 @@ package api type APIVersions struct { Versions []string `json:"versions"` } + +// RootPaths lists the paths available at root. +// For example: "/healthz", "/api". +type RootPaths struct { + Paths []string `json:"paths"` +} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion.go index 9a0535c1fccc..eaeb5de893de 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion.go @@ -314,6 +314,30 @@ func init() { } return nil }, + func(in *newer.PodStatusResult, out *PodStatusResult, s conversion.Scope) error { + if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.ObjectMeta, &out.TypeMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.Status, &out.State, 0); err != nil { + return err + } + return nil + }, + func(in *PodStatusResult, out *newer.PodStatusResult, s conversion.Scope) error { + if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.TypeMeta, &out.ObjectMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.State, &out.Status, 0); err != nil { + return err + } + return nil + }, func(in *newer.ReplicationController, out *ReplicationController, s conversion.Scope) error { if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil { @@ -562,7 +586,6 @@ func init() { return nil }, - // Event Status <-> Condition // Event Source <-> Source.Component // Event Host <-> Source.Host // TODO: remove this when it becomes possible to specify a field name conversion on a specific type @@ -573,7 +596,6 @@ func init() { if err := s.Convert(&in.ObjectMeta, &out.TypeMeta, 0); err != nil { return err } - out.Status = in.Condition out.Reason = in.Reason out.Message = in.Message out.Source = in.Source.Component @@ -588,7 +610,6 @@ func init() { if err := s.Convert(&in.TypeMeta, &out.ObjectMeta, 0); err != nil { return err } - out.Condition = in.Status out.Reason = in.Reason out.Message = in.Message out.Source.Component = in.Source @@ -651,6 +672,74 @@ func init() { } return nil }, + + // VolumeSource's HostDir is deprecated in favor of HostPath. + // TODO: It would be great if I could just map field names to + // convert or else maybe say "convert all members of this + // struct" and then fix up only the stuff that changed. + func(in *newer.VolumeSource, out *VolumeSource, s conversion.Scope) error { + if err := s.Convert(&in.EmptyDir, &out.EmptyDir, 0); err != nil { + return err + } + if err := s.Convert(&in.GitRepo, &out.GitRepo, 0); err != nil { + return err + } + if err := s.Convert(&in.GCEPersistentDisk, &out.GCEPersistentDisk, 0); err != nil { + return err + } + if err := s.Convert(&in.HostPath, &out.HostDir, 0); err != nil { + return err + } + return nil + }, + func(in *VolumeSource, out *newer.VolumeSource, s conversion.Scope) error { + if err := s.Convert(&in.EmptyDir, &out.EmptyDir, 0); err != nil { + return err + } + if err := s.Convert(&in.GitRepo, &out.GitRepo, 0); err != nil { + return err + } + if err := s.Convert(&in.GCEPersistentDisk, &out.GCEPersistentDisk, 0); err != nil { + return err + } + if err := s.Convert(&in.HostDir, &out.HostPath, 0); err != nil { + return err + } + return nil + }, + + func(in *newer.PullPolicy, out *PullPolicy, s conversion.Scope) error { + switch *in { + case newer.PullAlways: + *out = PullAlways + case newer.PullNever: + *out = PullNever + case newer.PullIfNotPresent: + *out = PullIfNotPresent + case "": + *out = "" + default: + // Let unknown values through - they will get caught by validation + *out = PullPolicy(*in) + } + return nil + }, + func(in *PullPolicy, out *newer.PullPolicy, s conversion.Scope) error { + switch *in { + case PullAlways: + *out = newer.PullAlways + case PullNever: + *out = newer.PullNever + case PullIfNotPresent: + *out = newer.PullIfNotPresent + case "": + *out = "" + default: + // Let unknown values through - they will get caught by validation + *out = newer.PullPolicy(*in) + } + return nil + }, ) if err != nil { // If one of the conversion functions is malformed, detect it immediately. diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion_test.go index a3a5a8cbed98..17a120d526be 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/conversion_test.go @@ -270,3 +270,49 @@ func TestServiceEmptySelector(t *testing.T) { t.Errorf("unexpected selector: %#v", obj) } } + +func TestPullPolicyConversion(t *testing.T) { + table := []struct { + versioned current.PullPolicy + internal newer.PullPolicy + }{ + { + versioned: current.PullAlways, + internal: newer.PullAlways, + }, { + versioned: current.PullNever, + internal: newer.PullNever, + }, { + versioned: current.PullIfNotPresent, + internal: newer.PullIfNotPresent, + }, { + versioned: "", + internal: "", + }, { + versioned: "invalid value", + internal: "invalid value", + }, + } + for _, item := range table { + var got newer.PullPolicy + err := Convert(&item.versioned, &got) + if err != nil { + t.Errorf("Unexpected error: %v", err) + continue + } + if e, a := item.internal, got; e != a { + t.Errorf("Expected: %q, got %q", e, a) + } + } + for _, item := range table { + var got current.PullPolicy + err := Convert(&item.internal, &got) + if err != nil { + t.Errorf("Unexpected error: %v", err) + continue + } + if e, a := item.versioned, got; e != a { + t.Errorf("Expected: %q, got %q", e, a) + } + } +} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/register.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/register.go index 6f936305d2c7..9d5e19bc8e87 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/register.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/register.go @@ -27,7 +27,7 @@ var Codec = runtime.CodecFor(api.Scheme, "v1beta1") func init() { api.Scheme.AddKnownTypes("v1beta1", &Pod{}, - &PodContainerInfo{}, + &PodStatusResult{}, &PodList{}, &ReplicationController{}, &ReplicationControllerList{}, @@ -57,7 +57,7 @@ func init() { } func (*Pod) IsAnAPIObject() {} -func (*PodContainerInfo) IsAnAPIObject() {} +func (*PodStatusResult) IsAnAPIObject() {} func (*PodList) IsAnAPIObject() {} func (*ReplicationController) IsAnAPIObject() {} func (*ReplicationControllerList) IsAnAPIObject() {} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/types.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/types.go index 77e19b6b9b50..1f11c12bbd7b 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/types.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1/types.go @@ -18,6 +18,7 @@ package v1beta1 import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/types" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" ) @@ -56,7 +57,7 @@ type ContainerManifest struct { // TODO: UUID on Manifext is deprecated in the future once we are done // with the API refactory. It is required for now to determine the instance // of a Pod. - UUID string `json:"uuid,omitempty" description:"manifest UUID"` + UUID types.UID `json:"uuid,omitempty" description:"manifest UUID"` Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"` Containers []Container `json:"containers" description:"list of containers belonging to the pod"` RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"` @@ -78,7 +79,7 @@ type Volume struct { // Source represents the location and type of a volume to mount. // This is optional for now. If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. - Source *VolumeSource `json:"source" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"` + Source VolumeSource `json:"source,omitempty" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"` } // VolumeSource represents the source location of a valume to mount. @@ -89,7 +90,7 @@ type VolumeSource struct { // things that are allowed to see the host machine. Most containers will NOT need this. // TODO(jonesdl) We need to restrict who can use host directory mounts and // who can/can not mount host directories as read/write. - HostDir *HostDir `json:"hostDir" description:"pre-existing host directory; generally for privileged system daemons or other agents tied to the host"` + HostDir *HostPath `json:"hostDir" description:"pre-existing host file or directory; generally for privileged system daemons or other agents tied to the host"` // EmptyDir represents a temporary directory that shares a pod's lifetime. EmptyDir *EmptyDir `json:"emptyDir" description:"temporary directory that shares a pod's lifetime"` // GCEPersistentDisk represents a GCE Disk resource that is attached to a @@ -99,8 +100,8 @@ type VolumeSource struct { GitRepo *GitRepo `json:"gitRepo" description:"git repository at a particular revision"` } -// HostDir represents bare host directory volume. -type HostDir struct { +// HostPath represents bare host directory volume. +type HostPath struct { Path string `json:"path" description:"path of the directory on the host"` } @@ -297,7 +298,7 @@ type Lifecycle struct { type TypeMeta struct { Kind string `json:"kind,omitempty" description:"kind of object, in CamelCase"` ID string `json:"id,omitempty" description:"name of the object; must be a DNS_SUBDOMAIN and unique among all objects of the same kind within the same namespace; used in resource URLs"` - UID string `json:"uid,omitempty" description:"UUID assigned by the system upon creation, unique across space and time"` + UID types.UID `json:"uid,omitempty" description:"UUID assigned by the system upon creation, unique across space and time"` CreationTimestamp util.Time `json:"creationTimestamp,omitempty" description:"RFC 3339 date and time at which the object was created; recorded by the system; null for lists"` SelfLink string `json:"selfLink,omitempty" description:"URL for the object"` ResourceVersion uint64 `json:"resourceVersion,omitempty" description:"string that identifies the internal version of this object that can be used by clients to determine when objects have changed; value must be treated as opaque by clients and passed unmodified back to the server"` @@ -411,6 +412,11 @@ type PodState struct { Info PodInfo `json:"info,omitempty" description:"map of container name to container status"` } +type PodStatusResult struct { + TypeMeta `json:",inline"` + State PodState `json:"state,omitempty" description:"current state of the pod"` +} + // PodList is a list of Pods. type PodList struct { TypeMeta `json:",inline"` @@ -776,12 +782,12 @@ type ServerOpList struct { // ObjectReference contains enough information to let you inspect or modify the referred object. type ObjectReference struct { - Kind string `json:"kind,omitempty" description:"kind of the referent"` - Namespace string `json:"namespace,omitempty" description:"namespace of the referent"` - ID string `json:"name,omitempty" description:"id of the referent"` - UID string `json:"uid,omitempty" description:"uid of the referent"` - APIVersion string `json:"apiVersion,omitempty" description:"API version of the referent"` - ResourceVersion string `json:"resourceVersion,omitempty" description:"specific resourceVersion to which this reference is made, if any"` + Kind string `json:"kind,omitempty" description:"kind of the referent"` + Namespace string `json:"namespace,omitempty" description:"namespace of the referent"` + ID string `json:"name,omitempty" description:"id of the referent"` + UID types.UID `json:"uid,omitempty" description:"uid of the referent"` + APIVersion string `json:"apiVersion,omitempty" description:"API version of the referent"` + ResourceVersion string `json:"resourceVersion,omitempty" description:"specific resourceVersion to which this reference is made, if any"` // Optional. If referring to a piece of an object instead of an entire object, this string // should contain information to identify the sub-object. For example, if the object @@ -809,6 +815,7 @@ type Event struct { // always be used for the same status. // TODO: define a way of making sure these are consistent and don't collide. // TODO: provide exact specification for format. + // DEPRECATED: Status (a.k.a Condition) value will be ignored. Status string `json:"status,omitempty" description:"short, machine understandable string that describes the current status of the referred object"` // Optional; this should be a short, machine understandable string that gives the reason @@ -825,7 +832,7 @@ type Event struct { // TODO: provide exact specification for format. Source string `json:"source,omitempty" description:"component reporting this event; short machine understandable string"` // Host name on which the event is generated. - Host string `json:"host,omitempty"` + Host string `json:"host,omitempty" description:"host name on which this event was generated"` // The time at which the client recorded the event. (Time of server receipt is in TypeMeta.) Timestamp util.Time `json:"timestamp,omitempty" description:"time at which the client recorded the event"` diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion.go index 9a316b425e96..3666e9314c84 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion.go @@ -345,6 +345,31 @@ func init() { return nil }, + func(in *newer.PodStatusResult, out *PodStatusResult, s conversion.Scope) error { + if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.ObjectMeta, &out.TypeMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.Status, &out.State, 0); err != nil { + return err + } + return nil + }, + func(in *PodStatusResult, out *newer.PodStatusResult, s conversion.Scope) error { + if err := s.Convert(&in.TypeMeta, &out.TypeMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.TypeMeta, &out.ObjectMeta, 0); err != nil { + return err + } + if err := s.Convert(&in.State, &out.Status, 0); err != nil { + return err + } + return nil + }, + func(in *newer.PodSpec, out *PodState, s conversion.Scope) error { if err := s.Convert(&in, &out.Manifest, 0); err != nil { return err @@ -489,7 +514,6 @@ func init() { if err := s.Convert(&in.ObjectMeta, &out.TypeMeta, 0); err != nil { return err } - out.Status = in.Condition out.Reason = in.Reason out.Message = in.Message out.Source = in.Source.Component @@ -504,7 +528,6 @@ func init() { if err := s.Convert(&in.TypeMeta, &out.ObjectMeta, 0); err != nil { return err } - out.Condition = in.Status out.Reason = in.Reason out.Message = in.Message out.Source.Component = in.Source @@ -567,6 +590,69 @@ func init() { } return nil }, + func(in *newer.VolumeSource, out *VolumeSource, s conversion.Scope) error { + if err := s.Convert(&in.EmptyDir, &out.EmptyDir, 0); err != nil { + return err + } + if err := s.Convert(&in.GitRepo, &out.GitRepo, 0); err != nil { + return err + } + if err := s.Convert(&in.GCEPersistentDisk, &out.GCEPersistentDisk, 0); err != nil { + return err + } + if err := s.Convert(&in.HostPath, &out.HostDir, 0); err != nil { + return err + } + return nil + }, + func(in *VolumeSource, out *newer.VolumeSource, s conversion.Scope) error { + if err := s.Convert(&in.EmptyDir, &out.EmptyDir, 0); err != nil { + return err + } + if err := s.Convert(&in.GitRepo, &out.GitRepo, 0); err != nil { + return err + } + if err := s.Convert(&in.GCEPersistentDisk, &out.GCEPersistentDisk, 0); err != nil { + return err + } + if err := s.Convert(&in.HostDir, &out.HostPath, 0); err != nil { + return err + } + return nil + }, + + func(in *newer.PullPolicy, out *PullPolicy, s conversion.Scope) error { + switch *in { + case newer.PullAlways: + *out = PullAlways + case newer.PullNever: + *out = PullNever + case newer.PullIfNotPresent: + *out = PullIfNotPresent + case "": + *out = "" + default: + // Let unknown values through - they will get caught by validation + *out = PullPolicy(*in) + } + return nil + }, + func(in *PullPolicy, out *newer.PullPolicy, s conversion.Scope) error { + switch *in { + case PullAlways: + *out = newer.PullAlways + case PullNever: + *out = newer.PullNever + case PullIfNotPresent: + *out = newer.PullIfNotPresent + case "": + *out = "" + default: + // Let unknown values through - they will get caught by validation + *out = newer.PullPolicy(*in) + } + return nil + }, ) if err != nil { // If one of the conversion functions is malformed, detect it immediately. diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion_test.go index 8e3c3ebc7756..2b04256d9bf2 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/conversion_test.go @@ -100,3 +100,49 @@ func TestNodeConversion(t *testing.T) { t.Errorf("unexpected encoding: %s - %#v", m["kind"], string(data)) } } + +func TestPullPolicyConversion(t *testing.T) { + table := []struct { + versioned current.PullPolicy + internal newer.PullPolicy + }{ + { + versioned: current.PullAlways, + internal: newer.PullAlways, + }, { + versioned: current.PullNever, + internal: newer.PullNever, + }, { + versioned: current.PullIfNotPresent, + internal: newer.PullIfNotPresent, + }, { + versioned: "", + internal: "", + }, { + versioned: "invalid value", + internal: "invalid value", + }, + } + for _, item := range table { + var got newer.PullPolicy + err := newer.Scheme.Convert(&item.versioned, &got) + if err != nil { + t.Errorf("Unexpected error: %v", err) + continue + } + if e, a := item.internal, got; e != a { + t.Errorf("Expected: %q, got %q", e, a) + } + } + for _, item := range table { + var got current.PullPolicy + err := newer.Scheme.Convert(&item.internal, &got) + if err != nil { + t.Errorf("Unexpected error: %v", err) + continue + } + if e, a := item.versioned, got; e != a { + t.Errorf("Expected: %q, got %q", e, a) + } + } +} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/register.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/register.go index 121f3d20a8e3..7682d9ad246d 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/register.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/register.go @@ -27,7 +27,7 @@ var Codec = runtime.CodecFor(api.Scheme, "v1beta2") func init() { api.Scheme.AddKnownTypes("v1beta2", &Pod{}, - &PodContainerInfo{}, + &PodStatusResult{}, &PodList{}, &ReplicationController{}, &ReplicationControllerList{}, @@ -57,7 +57,7 @@ func init() { } func (*Pod) IsAnAPIObject() {} -func (*PodContainerInfo) IsAnAPIObject() {} +func (*PodStatusResult) IsAnAPIObject() {} func (*PodList) IsAnAPIObject() {} func (*ReplicationController) IsAnAPIObject() {} func (*ReplicationControllerList) IsAnAPIObject() {} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/types.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/types.go index e8c26dab202c..3f1ef0bbacb1 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/types.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta2/types.go @@ -18,6 +18,7 @@ package v1beta2 import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/types" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" ) @@ -52,7 +53,7 @@ type Volume struct { // Source represents the location and type of a volume to mount. // This is optional for now. If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. - Source *VolumeSource `json:"source" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"` + Source VolumeSource `json:"source,omitempty" description:"location and type of volume to mount; at most one of HostDir, EmptyDir, GCEPersistentDisk, or GitRepo; default is EmptyDir"` } // VolumeSource represents the source location of a valume to mount. @@ -63,7 +64,7 @@ type VolumeSource struct { // things that are allowed to see the host machine. Most containers will NOT need this. // TODO(jonesdl) We need to restrict who can use host directory mounts and // who can/can not mount host directories as read/write. - HostDir *HostDir `json:"hostDir" description:"pre-existing host directory; generally for privileged system daemons or other agents tied to the host"` + HostDir *HostPath `json:"hostDir" description:"pre-existing host file or directory; generally for privileged system daemons or other agents tied to the host"` // EmptyDir represents a temporary directory that shares a pod's lifetime. EmptyDir *EmptyDir `json:"emptyDir" description:"temporary directory that shares a pod's lifetime"` // A persistent disk that is mounted to the @@ -73,8 +74,8 @@ type VolumeSource struct { GitRepo *GitRepo `json:"gitRepo" description:"git repository at a particular revision"` } -// HostDir represents bare host directory volume. -type HostDir struct { +// HostPath represents bare host directory volume. +type HostPath struct { Path string `json:"path" description:"path of the directory on the host"` } @@ -260,7 +261,7 @@ type Lifecycle struct { type TypeMeta struct { Kind string `json:"kind,omitempty" description:"kind of object, in CamelCase"` ID string `json:"id,omitempty" description:"name of the object; must be a DNS_SUBDOMAIN and unique among all objects of the same kind within the same namespace; used in resource URLs"` - UID string `json:"uid,omitempty" description:"UUID assigned by the system upon creation, unique across space and time"` + UID types.UID `json:"uid,omitempty" description:"UUID assigned by the system upon creation, unique across space and time"` CreationTimestamp util.Time `json:"creationTimestamp,omitempty" description:"RFC 3339 date and time at which the object was created; recorded by the system; null for lists"` SelfLink string `json:"selfLink,omitempty" description:"URL for the object"` ResourceVersion uint64 `json:"resourceVersion,omitempty" description:"string that identifies the internal version of this object that can be used by clients to determine when objects have changed; value must be treated as opaque by clients and passed unmodified back to the server"` @@ -374,6 +375,11 @@ type PodState struct { Info PodInfo `json:"info,omitempty" description:"map of container name to container status"` } +type PodStatusResult struct { + TypeMeta `json:",inline"` + State PodState `json:"state,omitempty" description:"current state of the pod"` +} + // PodList is a list of Pods. type PodList struct { TypeMeta `json:",inline"` @@ -749,12 +755,12 @@ type ServerOpList struct { // ObjectReference contains enough information to let you inspect or modify the referred object. type ObjectReference struct { - Kind string `json:"kind,omitempty" description:"kind of the referent"` - Namespace string `json:"namespace,omitempty" description:"namespace of the referent"` - ID string `json:"name,omitempty" description:"id of the referent"` - UID string `json:"uid,omitempty" description:"uid of the referent"` - APIVersion string `json:"apiVersion,omitempty" description:"API version of the referent"` - ResourceVersion string `json:"resourceVersion,omitempty" description:"specific resourceVersion to which this reference is made, if any"` + Kind string `json:"kind,omitempty" description:"kind of the referent"` + Namespace string `json:"namespace,omitempty" description:"namespace of the referent"` + ID string `json:"name,omitempty" description:"id of the referent"` + UID types.UID `json:"uid,omitempty" description:"uid of the referent"` + APIVersion string `json:"apiVersion,omitempty" description:"API version of the referent"` + ResourceVersion string `json:"resourceVersion,omitempty" description:"specific resourceVersion to which this reference is made, if any"` // Optional. If referring to a piece of an object instead of an entire object, this string // should contain information to identify the sub-object. For example, if the object @@ -782,6 +788,7 @@ type Event struct { // always be used for the same status. // TODO: define a way of making sure these are consistent and don't collide. // TODO: provide exact specification for format. + // DEPRECATED: Status (a.k.a Condition) value will be ignored. Status string `json:"status,omitempty" description:"short, machine understandable string that describes the current status of the referred object"` // Optional; this should be a short, machine understandable string that gives the reason @@ -799,7 +806,7 @@ type Event struct { Source string `json:"source,omitempty" description:"component reporting this event; short machine understandable string"` // Host name on which the event is generated. - Host string `json:"host,omitempty"` + Host string `json:"host,omitempty" description:"host name on which this event was generated"` // The time at which the client recorded the event. (Time of server receipt is in TypeMeta.) Timestamp util.Time `json:"timestamp,omitempty" description:"time at which the client recorded the event"` @@ -824,7 +831,7 @@ type ContainerManifest struct { // TODO: UUID on Manifext is deprecated in the future once we are done // with the API refactory. It is required for now to determine the instance // of a Pod. - UUID string `json:"uuid,omitempty" description:"manifest UUID"` + UUID types.UID `json:"uuid,omitempty" description:"manifest UUID"` Volumes []Volume `json:"volumes" description:"list of volumes that can be mounted by containers belonging to the pod"` Containers []Container `json:"containers" description:"list of containers belonging to the pod"` RestartPolicy RestartPolicy `json:"restartPolicy,omitempty" description:"restart policy for all containers within the pod; one of RestartPolicyAlways, RestartPolicyOnFailure, RestartPolicyNever"` diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/register.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/register.go index 3bb97847189b..6594cb67e895 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/register.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/register.go @@ -26,9 +26,9 @@ var Codec = runtime.CodecFor(api.Scheme, "v1beta3") func init() { api.Scheme.AddKnownTypes("v1beta3", - &PodContainerInfo{}, &Pod{}, &PodList{}, + &PodStatusResult{}, &PodTemplate{}, &PodTemplateList{}, &BoundPod{}, @@ -56,9 +56,9 @@ func init() { api.Scheme.AddKnownTypeWithName("v1beta3", "ServerOpList", &OperationList{}) } -func (*PodContainerInfo) IsAnAPIObject() {} func (*Pod) IsAnAPIObject() {} func (*PodList) IsAnAPIObject() {} +func (*PodStatusResult) IsAnAPIObject() {} func (*PodTemplate) IsAnAPIObject() {} func (*PodTemplateList) IsAnAPIObject() {} func (*BoundPod) IsAnAPIObject() {} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/types.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/types.go index cca9fed96d32..a02b1145a4fa 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/types.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta3/types.go @@ -19,6 +19,7 @@ package v1beta3 import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource" "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" + "github.com/GoogleCloudPlatform/kubernetes/pkg/types" "github.com/GoogleCloudPlatform/kubernetes/pkg/util" ) @@ -93,7 +94,7 @@ type ObjectMeta struct { // UID is the unique in time and space value for this object. It is typically generated by // the server on successful creation of a resource and is not allowed to change on PUT // operations. - UID string `json:"uid,omitempty"` + UID types.UID `json:"uid,omitempty"` // An opaque value that represents the version of this resource. May be used for optimistic // concurrency, change detection, and the watch operation on a resource or set of resources. @@ -138,7 +139,7 @@ const ( // // TODO: UUID on Manifest is deprecated in the future once we are done // // with the API refactoring. It is required for now to determine the instance // // of a Pod. -// UUID string `json:"uuid,omitempty"` +// UUID types.UID `json:"uuid,omitempty"` // Volumes []Volume `json:"volumes"` // Containers []Container `json:"containers"` // RestartPolicy RestartPolicy `json:"restartPolicy,omitempty"` @@ -163,18 +164,19 @@ type Volume struct { // Source represents the location and type of a volume to mount. // This is optional for now. If not specified, the Volume is implied to be an EmptyDir. // This implied behavior is deprecated and will be removed in a future version. - Source *VolumeSource `json:"source"` + Source VolumeSource `json:"source,omitempty"` } // VolumeSource represents the source location of a valume to mount. // Only one of its members may be specified. type VolumeSource struct { - // HostDir represents a pre-existing directory on the host machine that is directly - // exposed to the container. This is generally used for system agents or other privileged - // things that are allowed to see the host machine. Most containers will NOT need this. + // HostPath represents a pre-existing file or directory on the host + // machine that is directly exposed to the container. This is generally + // used for system agents or other privileged things that are allowed + // to see the host machine. Most containers will NOT need this. // TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not // mount host directories as read/write. - HostDir *HostDir `json:"hostDir"` + HostPath *HostPath `json:"hostPath"` // EmptyDir represents a temporary directory that shares a pod's lifetime. EmptyDir *EmptyDir `json:"emptyDir"` // GCEPersistentDisk represents a GCE Disk resource that is attached to a @@ -184,8 +186,8 @@ type VolumeSource struct { GitRepo *GitRepo `json:"gitRepo"` } -// HostDir represents bare host directory volume. -type HostDir struct { +// HostPath represents bare host directory volume. +type HostPath struct { Path string `json:"path"` } @@ -307,11 +309,11 @@ type PullPolicy string const ( // PullAlways means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - PullAlways PullPolicy = "PullAlways" + PullAlways PullPolicy = "Always" // PullNever means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn't present - PullNever PullPolicy = "PullNever" + PullNever PullPolicy = "Never" // PullIfNotPresent means that kubelet pulls if the image isn't present on disk. Container will fail if the image isn't present and the pull fails. - PullIfNotPresent PullPolicy = "PullIfNotPresent" + PullIfNotPresent PullPolicy = "IfNotPresent" ) // Container represents a single container that is expected to be run on the host. @@ -434,13 +436,6 @@ type ContainerStatus struct { // PodInfo contains one entry for every container with available info. type PodInfo map[string]ContainerStatus -// PodContainerInfo is a wrapper for PodInfo that can be encode/decoded -type PodContainerInfo struct { - TypeMeta `json:",inline"` - ObjectMeta `json:"metadata,omitempty"` - ContainerInfo PodInfo `json:"containerInfo" description:"information about each container in this pod"` -} - type RestartPolicyAlways struct{} // TODO(dchen1107): Define what kinds of failures should restart. @@ -510,6 +505,15 @@ type PodStatus struct { Info PodInfo `json:"info,omitempty"` } +// PodStatusResult is a wrapper for PodStatus returned by kubelet that can be encode/decoded +type PodStatusResult struct { + TypeMeta `json:",inline"` + ObjectMeta `json:"metadata,omitempty"` + // Status represents the current information about a pod. This data may not be up + // to date. + Status PodStatus `json:"status,omitempty"` +} + // Pod is a collection of containers that can run on a host. This resource is created // by clients and scheduled onto hosts. BoundPod represents the state of this resource // to hosts. @@ -995,12 +999,12 @@ type OperationList struct { // ObjectReference contains enough information to let you inspect or modify the referred object. type ObjectReference struct { - Kind string `json:"kind,omitempty"` - Namespace string `json:"namespace,omitempty"` - Name string `json:"name,omitempty"` - UID string `json:"uid,omitempty"` - APIVersion string `json:"apiVersion,omitempty"` - ResourceVersion string `json:"resourceVersion,omitempty"` + Kind string `json:"kind,omitempty"` + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` + UID types.UID `json:"uid,omitempty"` + APIVersion string `json:"apiVersion,omitempty"` + ResourceVersion string `json:"resourceVersion,omitempty"` // Optional. If referring to a piece of an object instead of an entire object, this string // should contain information to identify the sub-object. For example, if the object @@ -1029,18 +1033,8 @@ type Event struct { // Required. The object that this event is about. InvolvedObject ObjectReference `json:"involvedObject,omitempty"` - // Should be a short, machine understandable string that describes the current condition - // of the referred object. This should not give the reason for being in this state. - // Examples: "Running", "CantStart", "CantSchedule", "Deleted". - // It's OK for components to make up conditions to report here, but the same string should - // always be used for the same conditions. - // TODO: define a way of making sure these are consistent and don't collide. - // TODO: provide exact specification for format. - Condition string `json:"condition,omitempty"` - // Optional; this should be a short, machine understandable string that gives the reason - // for the transition into the object's current condition. For example, if ObjectCondition is - // "CantStart", StatusReason might be "ImageNotFound". + // for this event being generated. // TODO: provide exact specification for format. Reason string `json:"reason,omitempty"` diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/schema_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/schema_test.go index 693429d2c6b1..30862e6cf001 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/schema_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/schema_test.go @@ -118,6 +118,10 @@ var apiObjectFuzzer = fuzz.New().NilChance(.5).NumElements(1, 1).Funcs( c.RandString(): c.RandString(), } }, + func(p *api.PullPolicy, c fuzz.Continue) { + policies := []api.PullPolicy{api.PullAlways, api.PullNever, api.PullIfNotPresent} + *p = policies[c.Rand.Intn(len(policies))] + }, ) func TestLoad(t *testing.T) { diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation.go index 80b059bce6bf..b3b0f01bb3cf 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation.go @@ -40,14 +40,7 @@ func validateVolumes(volumes []api.Volume) (util.StringSet, errs.ValidationError allNames := util.StringSet{} for i := range volumes { vol := &volumes[i] // so we can set default values - el := errs.ValidationErrorList{} - if vol.Source == nil { - // TODO: Enforce that a source is set once we deprecate the implied form. - vol.Source = &api.VolumeSource{ - EmptyDir: &api.EmptyDir{}, - } - } - el = validateSource(vol.Source).Prefix("source") + el := validateSource(&vol.Source).Prefix("source") if len(vol.Name) == 0 { el = append(el, errs.NewFieldRequired("name", vol.Name)) } else if !util.IsDNSLabel(vol.Name) { @@ -67,9 +60,9 @@ func validateVolumes(volumes []api.Volume) (util.StringSet, errs.ValidationError func validateSource(source *api.VolumeSource) errs.ValidationErrorList { numVolumes := 0 allErrs := errs.ValidationErrorList{} - if source.HostDir != nil { + if source.HostPath != nil { numVolumes++ - allErrs = append(allErrs, validateHostDir(source.HostDir).Prefix("hostDirectory")...) + allErrs = append(allErrs, validateHostPath(source.HostPath).Prefix("hostPath")...) } if source.EmptyDir != nil { numVolumes++ @@ -77,22 +70,25 @@ func validateSource(source *api.VolumeSource) errs.ValidationErrorList { } if source.GitRepo != nil { numVolumes++ - allErrs = append(allErrs, validateGitRepo(source.GitRepo)...) + allErrs = append(allErrs, validateGitRepo(source.GitRepo).Prefix("gitRepo")...) } if source.GCEPersistentDisk != nil { numVolumes++ - allErrs = append(allErrs, validateGCEPersistentDisk(source.GCEPersistentDisk)...) + allErrs = append(allErrs, validateGCEPersistentDisk(source.GCEPersistentDisk).Prefix("persistentDisk")...) } - if numVolumes != 1 { + if numVolumes == 0 { + // TODO: Enforce that a source is set once we deprecate the implied form. + source.EmptyDir = &api.EmptyDir{} + } else if numVolumes != 1 { allErrs = append(allErrs, errs.NewFieldInvalid("", source, "exactly 1 volume type is required")) } return allErrs } -func validateHostDir(hostDir *api.HostDir) errs.ValidationErrorList { +func validateHostPath(hostDir *api.HostPath) errs.ValidationErrorList { allErrs := errs.ValidationErrorList{} if hostDir.Path == "" { - allErrs = append(allErrs, errs.NewNotFound("path", hostDir.Path)) + allErrs = append(allErrs, errs.NewFieldRequired("path", hostDir.Path)) } return allErrs } @@ -100,7 +96,7 @@ func validateHostDir(hostDir *api.HostDir) errs.ValidationErrorList { func validateGitRepo(gitRepo *api.GitRepo) errs.ValidationErrorList { allErrs := errs.ValidationErrorList{} if gitRepo.Repository == "" { - allErrs = append(allErrs, errs.NewFieldRequired("gitRepo.Repository", gitRepo.Repository)) + allErrs = append(allErrs, errs.NewFieldRequired("repository", gitRepo.Repository)) } return allErrs } @@ -108,13 +104,13 @@ func validateGitRepo(gitRepo *api.GitRepo) errs.ValidationErrorList { func validateGCEPersistentDisk(PD *api.GCEPersistentDisk) errs.ValidationErrorList { allErrs := errs.ValidationErrorList{} if PD.PDName == "" { - allErrs = append(allErrs, errs.NewFieldRequired("PD.PDName", PD.PDName)) + allErrs = append(allErrs, errs.NewFieldRequired("pdName", PD.PDName)) } if PD.FSType == "" { - allErrs = append(allErrs, errs.NewFieldRequired("PD.FSType", PD.FSType)) + allErrs = append(allErrs, errs.NewFieldRequired("fsType", PD.FSType)) } if PD.Partition < 0 || PD.Partition > 255 { - allErrs = append(allErrs, errs.NewFieldInvalid("PD.Partition", PD.Partition, "")) + allErrs = append(allErrs, errs.NewFieldInvalid("partition", PD.Partition, "")) } return allErrs } @@ -266,6 +262,29 @@ func validateLifecycle(lifecycle *api.Lifecycle) errs.ValidationErrorList { return allErrs } +// TODO(dchen1107): Move this along with other defaulting values +func validatePullPolicyWithDefault(ctr *api.Container) errs.ValidationErrorList { + allErrors := errs.ValidationErrorList{} + + switch ctr.ImagePullPolicy { + case "": + // TODO(dchen1107): Move ParseImageName code to pkg/util + parts := strings.Split(ctr.Image, ":") + // Check image tag + if parts[len(parts)-1] == "latest" { + ctr.ImagePullPolicy = api.PullAlways + } else { + ctr.ImagePullPolicy = api.PullIfNotPresent + } + case api.PullAlways, api.PullIfNotPresent, api.PullNever: + break + default: + allErrors = append(allErrors, errs.NewFieldNotSupported("", ctr.ImagePullPolicy)) + } + + return allErrors +} + func validateContainers(containers []api.Container, volumes util.StringSet) errs.ValidationErrorList { allErrs := errs.ValidationErrorList{} @@ -294,6 +313,7 @@ func validateContainers(containers []api.Container, volumes util.StringSet) errs cErrs = append(cErrs, validatePorts(ctr.Ports).Prefix("ports")...) cErrs = append(cErrs, validateEnv(ctr.Env).Prefix("env")...) cErrs = append(cErrs, validateVolumeMounts(ctr.VolumeMounts, volumes).Prefix("volumeMounts")...) + cErrs = append(cErrs, validatePullPolicyWithDefault(ctr).Prefix("pullPolicy")...) allErrs = append(allErrs, cErrs.PrefixIndex(i)...) } // Check for colliding ports across all containers. @@ -398,6 +418,7 @@ func ValidatePodSpec(spec *api.PodSpec) errs.ValidationErrorList { return allErrs } +// ValidateLabels validates that a set of labels are correctly defined. func ValidateLabels(labels map[string]string, field string) errs.ValidationErrorList { allErrs := errs.ValidationErrorList{} for k := range labels { diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation_test.go index 2757f268ff0b..1e0975ab2631 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation/validation_test.go @@ -53,7 +53,7 @@ func TestValidateLabels(t *testing.T) { {"1.2.3.4/5678": "bar"}, } for i := range successCases { - errs := validateLabels(successCases[i], "field") + errs := ValidateLabels(successCases[i], "field") if len(errs) != 0 { t.Errorf("case[%d] expected success, got %#v", i, errs) } @@ -67,7 +67,7 @@ func TestValidateLabels(t *testing.T) { {strings.Repeat("a", 254): "bar"}, } for i := range errorCases { - errs := validateLabels(errorCases[i], "field") + errs := ValidateLabels(errorCases[i], "field") if len(errs) != 1 { t.Errorf("case[%d] expected failure", i) } @@ -77,11 +77,11 @@ func TestValidateLabels(t *testing.T) { func TestValidateVolumes(t *testing.T) { successCase := []api.Volume{ {Name: "abc"}, - {Name: "123", Source: &api.VolumeSource{HostDir: &api.HostDir{"/mnt/path2"}}}, - {Name: "abc-123", Source: &api.VolumeSource{HostDir: &api.HostDir{"/mnt/path3"}}}, - {Name: "empty", Source: &api.VolumeSource{EmptyDir: &api.EmptyDir{}}}, - {Name: "gcepd", Source: &api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDisk{"my-PD", "ext4", 1, false}}}, - {Name: "gitrepo", Source: &api.VolumeSource{GitRepo: &api.GitRepo{"my-repo", "hashstring"}}}, + {Name: "123", Source: api.VolumeSource{HostPath: &api.HostPath{"/mnt/path2"}}}, + {Name: "abc-123", Source: api.VolumeSource{HostPath: &api.HostPath{"/mnt/path3"}}}, + {Name: "empty", Source: api.VolumeSource{EmptyDir: &api.EmptyDir{}}}, + {Name: "gcepd", Source: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDisk{"my-PD", "ext4", 1, false}}}, + {Name: "gitrepo", Source: api.VolumeSource{GitRepo: &api.GitRepo{"my-repo", "hashstring"}}}, } names, errs := validateVolumes(successCase) if len(errs) != 0 { @@ -220,6 +220,54 @@ func TestValidateVolumeMounts(t *testing.T) { } } +func TestValidatePullPolicy(t *testing.T) { + type T struct { + Container api.Container + ExpectedPolicy api.PullPolicy + } + testCases := map[string]T{ + "NotPresent1": { + api.Container{Name: "abc", Image: "image:latest", ImagePullPolicy: "IfNotPresent"}, + api.PullIfNotPresent, + }, + "NotPresent2": { + api.Container{Name: "abc1", Image: "image", ImagePullPolicy: "IfNotPresent"}, + api.PullIfNotPresent, + }, + "Always1": { + api.Container{Name: "123", Image: "image:latest", ImagePullPolicy: "Always"}, + api.PullAlways, + }, + "Always2": { + api.Container{Name: "1234", Image: "image", ImagePullPolicy: "Always"}, + api.PullAlways, + }, + "Never1": { + api.Container{Name: "abc-123", Image: "image:latest", ImagePullPolicy: "Never"}, + api.PullNever, + }, + "Never2": { + api.Container{Name: "abc-1234", Image: "image", ImagePullPolicy: "Never"}, + api.PullNever, + }, + "DefaultToNotPresent": {api.Container{Name: "notPresent", Image: "image"}, api.PullIfNotPresent}, + "DefaultToNotPresent2": {api.Container{Name: "notPresent1", Image: "image:sometag"}, api.PullIfNotPresent}, + "DefaultToAlways1": {api.Container{Name: "always", Image: "image:latest"}, api.PullAlways}, + "DefaultToAlways2": {api.Container{Name: "always", Image: "foo.bar.com:5000/my/image:latest"}, api.PullAlways}, + } + for k, v := range testCases { + ctr := &v.Container + errs := validatePullPolicyWithDefault(ctr) + if len(errs) != 0 { + t.Errorf("case[%s] expected success, got %#v", k, errs) + } + if ctr.ImagePullPolicy != v.ExpectedPolicy { + t.Errorf("case[%s] expected policy %v, got %v", k, v.ExpectedPolicy, ctr.ImagePullPolicy) + } + } + +} + func TestValidateContainers(t *testing.T) { volumes := util.StringSet{} capabilities.SetForTests(capabilities.Capabilities{ @@ -366,8 +414,8 @@ func TestValidateManifest(t *testing.T) { { Version: "v1beta1", ID: "abc", - Volumes: []api.Volume{{Name: "vol1", Source: &api.VolumeSource{HostDir: &api.HostDir{"/mnt/vol1"}}}, - {Name: "vol2", Source: &api.VolumeSource{HostDir: &api.HostDir{"/mnt/vol2"}}}}, + Volumes: []api.Volume{{Name: "vol1", Source: api.VolumeSource{HostPath: &api.HostPath{"/mnt/vol1"}}}, + {Name: "vol2", Source: api.VolumeSource{HostPath: &api.HostPath{"/mnt/vol2"}}}}, Containers: []api.Container{ { Name: "abc", @@ -878,7 +926,10 @@ func TestValidateService(t *testing.T) { }, existing: api.ServiceList{ Items: []api.Service{ - {Spec: api.ServiceSpec{Port: 80, CreateExternalLoadBalancer: true}}, + { + ObjectMeta: api.ObjectMeta{Name: "def123", Namespace: api.NamespaceDefault}, + Spec: api.ServiceSpec{Port: 80, CreateExternalLoadBalancer: true}, + }, }, }, numErrs: 1, @@ -895,7 +946,10 @@ func TestValidateService(t *testing.T) { }, existing: api.ServiceList{ Items: []api.Service{ - {Spec: api.ServiceSpec{Port: 80}}, + { + ObjectMeta: api.ObjectMeta{Name: "def123", Namespace: api.NamespaceDefault}, + Spec: api.ServiceSpec{Port: 80}, + }, }, }, numErrs: 0, @@ -911,7 +965,10 @@ func TestValidateService(t *testing.T) { }, existing: api.ServiceList{ Items: []api.Service{ - {Spec: api.ServiceSpec{Port: 80, CreateExternalLoadBalancer: true}}, + { + ObjectMeta: api.ObjectMeta{Name: "def123", Namespace: api.NamespaceDefault}, + Spec: api.ServiceSpec{Port: 80, CreateExternalLoadBalancer: true}, + }, }, }, numErrs: 0, @@ -927,7 +984,10 @@ func TestValidateService(t *testing.T) { }, existing: api.ServiceList{ Items: []api.Service{ - {Spec: api.ServiceSpec{Port: 80}}, + { + ObjectMeta: api.ObjectMeta{Name: "def123", Namespace: api.NamespaceDefault}, + Spec: api.ServiceSpec{Port: 80}, + }, }, }, numErrs: 0, @@ -1001,7 +1061,7 @@ func TestValidateReplicationController(t *testing.T) { invalidVolumePodTemplate := api.PodTemplate{ Spec: api.PodTemplateSpec{ Spec: api.PodSpec{ - Volumes: []api.Volume{{Name: "gcepd", Source: &api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDisk{"my-PD", "ext4", 1, false}}}}, + Volumes: []api.Volume{{Name: "gcepd", Source: api.VolumeSource{GCEPersistentDisk: &api.GCEPersistentDisk{"my-PD", "ext4", 1, false}}}}, }, }, } @@ -1074,7 +1134,7 @@ func TestValidateReplicationController(t *testing.T) { Selector: validSelector, }, }, - "read-write presistent disk": { + "read-write persistent disk": { ObjectMeta: api.ObjectMeta{Name: "abc"}, Spec: api.ReplicationControllerSpec{ Selector: validSelector, diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go index 6d6ef4274b7c..70eec069e378 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go @@ -62,9 +62,9 @@ func Handle(storage map[string]RESTStorage, codec runtime.Codec, root string, ve group := NewAPIGroupVersion(storage, codec, prefix, selfLinker, admissionControl) container := restful.NewContainer() mux := container.ServeMux - group.InstallREST(container, root, version) + group.InstallREST(container, mux, root, version) ws := new(restful.WebService) - InstallSupport(container, ws) + InstallSupport(mux, ws) container.Add(ws) return &defaultAPIServer{mux, group} } @@ -103,28 +103,25 @@ func indirectArbitraryPointer(ptrToObject interface{}) interface{} { return reflect.Indirect(reflect.ValueOf(ptrToObject)).Interface() } -func registerResourceHandlers(ws *restful.WebService, version string, path string, storage RESTStorage, kinds map[string]reflect.Type, h restful.RouteFunction, namespaceScope bool) { - glog.V(3).Infof("Installing /%s/%s\n", version, path) +func registerResourceHandlers(ws *restful.WebService, version string, path string, storage RESTStorage, h restful.RouteFunction, namespaceScope bool) error { object := storage.New() _, kind, err := api.Scheme.ObjectVersionAndKind(object) if err != nil { - glog.Warningf("error getting kind: %v\n", err) - return + return err } versionedPtr, err := api.Scheme.New(version, kind) if err != nil { - glog.Warningf("error making object: %v\n", err) - return + return err } versionedObject := indirectArbitraryPointer(versionedPtr) - glog.V(3).Infoln("type: ", reflect.TypeOf(versionedObject)) // See github.com/emicklei/go-restful/blob/master/jsr311.go for routing logic // and status-code behavior if namespaceScope { path = "ns/{namespace}/" + path } - glog.V(3).Infof("Installing version=/%s, kind=/%s, path=/%s\n", version, kind, path) + + glog.V(5).Infof("Installing version=/%s, kind=/%s, path=/%s", version, kind, path) nameParam := ws.PathParameter("name", "name of the "+kind).DataType("string") namespaceParam := ws.PathParameter("namespace", "object name and auth scope, such as for teams and projects").DataType("string") @@ -149,11 +146,10 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin _, listKind, err := api.Scheme.ObjectVersionAndKind(list) versionedListPtr, err := api.Scheme.New(version, listKind) if err != nil { - glog.Errorf("error making list object: %v\n", err) - return + return err } versionedList := indirectArbitraryPointer(versionedListPtr) - glog.V(3).Infoln("type: ", reflect.TypeOf(versionedList)) + glog.V(5).Infoln("type: ", reflect.TypeOf(versionedList)) ws.Route(listRoute.Returns(http.StatusOK, "OK", versionedList)) } else { ws.Route(listRoute.Returns(http.StatusMethodNotAllowed, "listing objects is not supported", nil)) @@ -192,6 +188,8 @@ func registerResourceHandlers(ws *restful.WebService, version string, path strin } else { ws.Route(deleteRoute.Returns(http.StatusMethodNotAllowed, "deleting objects is not supported", nil)) } + + return nil } // Adds the given param to the given route builder if shouldAdd is true. Does nothing if shouldAdd is false. @@ -205,7 +203,7 @@ func addParamIf(b *restful.RouteBuilder, parameter *restful.Parameter, shouldAdd // InstallREST registers the REST handlers (storage, watch, and operations) into a restful Container. // It is expected that the provided path root prefix will serve all operations. Root MUST NOT end // in a slash. A restful WebService is created for the group and version. -func (g *APIGroupVersion) InstallREST(container *restful.Container, root string, version string) { +func (g *APIGroupVersion) InstallREST(container *restful.Container, mux Mux, root string, version string) error { prefix := path.Join(root, version) restHandler := &g.handler strippedHandler := http.StripPrefix(prefix, restHandler) @@ -233,9 +231,6 @@ func (g *APIGroupVersion) InstallREST(container *restful.Container, root string, // TODO: add scheme to APIGroupVersion rather than using api.Scheme - kinds := api.Scheme.KnownTypes(version) - glog.V(4).Infof("InstallREST: %v kinds: %#v", version, kinds) - // TODO: #2057: Return API resources on "/". // TODO: Add status documentation using Returns() @@ -262,15 +257,17 @@ func (g *APIGroupVersion) InstallREST(container *restful.Container, root string, for path, storage := range g.handler.storage { // register legacy patterns where namespace is optional in path - registerResourceHandlers(ws, version, path, storage, kinds, h, false) + if err := registerResourceHandlers(ws, version, path, storage, h, false); err != nil { + return err + } // register pattern where namespace is required in path - registerResourceHandlers(ws, version, path, storage, kinds, h, true) + if err := registerResourceHandlers(ws, version, path, storage, h, true); err != nil { + return err + } } // TODO: port the rest of these. Sadly, if we don't, we'll have inconsistent // API behavior, as well as lack of documentation - mux := container.ServeMux - // Note: update GetAttribs() when adding a handler. mux.Handle(prefix+"/watch/", http.StripPrefix(prefix+"/watch/", watchHandler)) mux.Handle(prefix+"/proxy/", http.StripPrefix(prefix+"/proxy/", proxyHandler)) @@ -279,6 +276,8 @@ func (g *APIGroupVersion) InstallREST(container *restful.Container, root string, mux.Handle(prefix+"/operations/", http.StripPrefix(prefix+"/operations/", opHandler)) container.Add(ws) + + return nil } // TODO: Convert to go-restful @@ -295,9 +294,9 @@ func InstallValidator(mux Mux, servers func() map[string]Server) { // TODO: document all handlers // InstallSupport registers the APIServer support functions -func InstallSupport(container *restful.Container, ws *restful.WebService) { +func InstallSupport(mux Mux, ws *restful.WebService) { // TODO: convert healthz to restful and remove container arg - healthz.InstallHandler(container.ServeMux) + healthz.InstallHandler(mux) // Set up a service to return the git code version. ws.Path("/version") diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/index.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/index.go index 3b05c5270f2e..0b61665a1060 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/index.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/index.go @@ -17,11 +17,24 @@ limitations under the License. package apiserver import ( - "io" "net/http" + "sort" + + "github.com/GoogleCloudPlatform/kubernetes/pkg/api" + + "github.com/emicklei/go-restful" ) -// handleIndex is the root index page for Kubernetes. -func HandleIndex(w http.ResponseWriter, r *http.Request) { - io.WriteString(w, "Welcome to Kubernetes") +func IndexHandler(container *restful.Container, muxHelper *MuxHelper) func(http.ResponseWriter, *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + var handledPaths []string + // Extract the paths handled using restful.WebService + for _, ws := range container.RegisteredWebServices() { + handledPaths = append(handledPaths, ws.RootPath()) + } + // Extract the paths handled using mux handler. + handledPaths = append(handledPaths, muxHelper.RegisteredPaths...) + sort.Strings(handledPaths) + writeRawJSON(http.StatusOK, api.RootPaths{Paths: handledPaths}, w) + } } diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/mux_helper.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/mux_helper.go new file mode 100644 index 000000000000..e95f0719cdbe --- /dev/null +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/mux_helper.go @@ -0,0 +1,37 @@ +/* +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +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 apiserver + +import ( + "net/http" +) + +// Offers additional functionality over ServeMux, for ex: supports listing registered paths. +type MuxHelper struct { + Mux Mux + RegisteredPaths []string +} + +func (m *MuxHelper) Handle(path string, handler http.Handler) { + m.RegisteredPaths = append(m.RegisteredPaths, path) + m.Mux.Handle(path, handler) +} + +func (m *MuxHelper) HandleFunc(path string, handler func(http.ResponseWriter, *http.Request)) { + m.RegisteredPaths = append(m.RegisteredPaths, path) + m.Mux.HandleFunc(path, handler) +} diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy.go index edaed7423b9f..360ef4171524 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy.go @@ -96,6 +96,12 @@ func (r *ProxyHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { if len(parts) > 2 { proxyParts := parts[2:] rest = strings.Join(proxyParts, "/") + if strings.HasSuffix(req.URL.Path, "/") { + // The original path had a trailing slash, which has been stripped + // by KindAndNamespace(). We should add it back because some + // servers (like etcd) require it. + rest = rest + "/" + } } storage, ok := r.storage[kind] if !ok { @@ -163,6 +169,11 @@ type proxyTransport struct { } func (t *proxyTransport) RoundTrip(req *http.Request) (*http.Response, error) { + // Add reverse proxy headers. + req.Header.Set("X-Forwarded-Uri", t.proxyPathPrepend+req.URL.Path) + req.Header.Set("X-Forwarded-Host", t.proxyHost) + req.Header.Set("X-Forwarded-Proto", t.proxyScheme) + resp, err := http.DefaultTransport.RoundTrip(req) if err != nil { @@ -174,7 +185,9 @@ func (t *proxyTransport) RoundTrip(req *http.Request) (*http.Response, error) { return resp, nil } - if resp.Header.Get("Content-Type") != "text/html" { + cType := resp.Header.Get("Content-Type") + cType = strings.TrimSpace(strings.SplitN(cType, ";", 2)[0]) + if cType != "text/html" { // Do nothing, simply pass through return resp, nil } diff --git a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy_test.go b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy_test.go index fdc9954af959..99f3ce66f8df 100644 --- a/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy_test.go +++ b/Godeps/_workspace/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/proxy_test.go @@ -52,53 +52,81 @@ func fmtHTML(in string) string { return string(out.Bytes()) } -func TestProxyTransport_fixLinks(t *testing.T) { +func TestProxyTransport(t *testing.T) { testTransport := &proxyTransport{ proxyScheme: "http", proxyHost: "foo.com", - proxyPathPrepend: "/proxy/minion/minion1:10250/", + proxyPathPrepend: "/proxy/minion/minion1:10250", } testTransport2 := &proxyTransport{ proxyScheme: "https", proxyHost: "foo.com", - proxyPathPrepend: "/proxy/minion/minion1:8080/", + proxyPathPrepend: "/proxy/minion/minion1:8080", } table := map[string]struct { - input string - sourceURL string - transport *proxyTransport - output string + input string + sourceURL string + transport *proxyTransport + output string + contentType string + forwardedURI string }{ "normal": { - input: `
kubelet.loggoogle.log
`, - sourceURL: "http://myminion.com/logs/log.log", - transport: testTransport, - output: `
kubelet.loggoogle.log
`, + input: `
kubelet.loggoogle.log
`, + sourceURL: "http://myminion.com/logs/log.log", + transport: testTransport, + output: `
kubelet.loggoogle.log
`, + contentType: "text/html", + forwardedURI: "/proxy/minion/minion1:10250/logs/log.log", + }, + "content-type charset": { + input: `
kubelet.loggoogle.log
`, + sourceURL: "http://myminion.com/logs/log.log", + transport: testTransport, + output: `
kubelet.loggoogle.log
`, + contentType: "text/html; charset=utf-8", + forwardedURI: "/proxy/minion/minion1:10250/logs/log.log", + }, + "content-type passthrough": { + input: `
kubelet.loggoogle.log
`, + sourceURL: "http://myminion.com/logs/log.log", + transport: testTransport, + output: `
kubelet.loggoogle.log
`, + contentType: "text/plain", + forwardedURI: "/proxy/minion/minion1:10250/logs/log.log", }, "subdir": { - input: `kubelet.loggoogle.log`, - sourceURL: "http://myminion.com/whatever/apt/somelog.log", - transport: testTransport2, - output: `kubelet.loggoogle.log`, + input: `kubelet.loggoogle.log`, + sourceURL: "http://myminion.com/whatever/apt/somelog.log", + transport: testTransport2, + output: `kubelet.loggoogle.log`, + contentType: "text/html", + forwardedURI: "/proxy/minion/minion1:8080/whatever/apt/somelog.log", }, "image": { - input: `
`, - sourceURL: "http://myminion.com/", - transport: testTransport, - output: `
`, + input: `
`, + sourceURL: "http://myminion.com/", + transport: testTransport, + output: `
`, + contentType: "text/html", + forwardedURI: "/proxy/minion/minion1:10250/", }, "abs": { - input: `